Search found 1147 matches

by A_AhkUser
09 Oct 2020, 12:37
Forum: Ask for Help (v1)
Topic: Use Clipboard instead of temp-file from CMD-prompt - Possible? Topic is solved
Replies: 7
Views: 905

Re: Use Clipboard instead of temp-file from CMD-prompt - Possible? Topic is solved

Thanks for the suggestions! ... output:=ComObjCreate("WScript.Shell").Exec("Dir").StdOut.ReadAll() (...) (but I got an error message) Error: 0x80070002 - The file can not be found. Source: WshShell.Exec For reference: ; https://www.vbsedit.com/html/f3358e96-3d5a-46c2-b43b-3107e586736e.asp WshRunnin...
by A_AhkUser
09 Oct 2020, 12:26
Forum: Ask for Help (v1)
Topic: Two functions sharing the same windows message Topic is solved
Replies: 1
Views: 379

Re: Two functions sharing the same windows message Topic is solved

Hi colt , is it possible to programmatically detect the function name for a given windows message? This returns the name of the current legacy monitor for MsgNumber (blank if none): Name := OnMessage(MsgNumber) source: OnMessage > Function Name vs Object > Function Name hope this helps A_AhkUser
by A_AhkUser
05 Oct 2020, 07:57
Forum: Ask for Help (v1)
Topic: Throw an error about a wrong parameter of a function - with the name of this parameter Topic is solved
Replies: 4
Views: 610

Re: Throw an error about a wrong parameter of a function - with the name of this parameter Topic is solved

(...) How to achieve the same effect (...) I know your question is more about finding a way to report the name of the wrong argument but I should also mention that you can use the exception function to mimic the way an error is thrown when you call the Hotstring built-in function passing it a wrong...
by A_AhkUser
03 Oct 2020, 07:14
Forum: Помощь
Topic: Помогите дополнить скрипт
Replies: 3
Views: 1314

Re: Помогите дополнить скрипт

помогите сделать так, чтоб он включался и отключался на ПКМ Значит, вы хотите чтобы GUI то показываться, то исчезает при клике правой кнопки мыши? Если да, получается такой дополненный скрипт: w := 2, h := 2 Color := "C71585" ; WS_EX_TRANSPARENT := 0x20, WS_EX_LAYERED := 0x80000 WS_EX_NOACTIVATE :=...
by A_AhkUser
02 Oct 2020, 14:03
Forum: Ask for Help (v1)
Topic: Get the height / width of an image - to an array (object) Topic is solved
Replies: 34
Views: 3825

Re: Get the height / width of an image - to an array (object) Topic is solved

A little trick to find an image's size is below. imgWidth(img, ByRef height) { ; Get image's dimensions If FileExist(img) { GUI, Add, Picture, hwndpic, %img% ControlGetPos,,, width, height,, ahk_id %pic% Gui, Destroy } Else height := width := 0 Return width } Nice trick :thumbup: Although for a fun...
by A_AhkUser
02 Oct 2020, 13:42
Forum: Ask for Help (v1)
Topic: Please help complete this script(confining mouse to a window)
Replies: 23
Views: 2043

Re: Please help complete this script(confining mouse to a window)

Oh, I tested my original script with #warn on top, and it really shows error dialog..never realized because all my hotkey worked well. So does having unreachable code in the script, although fully working, cause problem that I am not aware of? Bear in mind that it is question of preventive warnings...
by A_AhkUser
01 Oct 2020, 11:58
Forum: Ask for Help (v1)
Topic: Please help complete this script(confining mouse to a window)
Replies: 23
Views: 2043

Re: Please help complete this script(confining mouse to a window)

@A_AhkUser Disabling warnings does not solve anything actually. it just stops showing error code, while the script malfunctions or not function at all as far as errors are not revised. I removed all return for single line hotkey to see what happens, doesn't do a thing. and I can't remove setstoreca...
by A_AhkUser
01 Oct 2020, 11:25
Forum: Ask for Help (v1)
Topic: Please help complete this script(confining mouse to a window)
Replies: 23
Views: 2043

Re: Please help complete this script(confining mouse to a window)

Jim Dunn Actaully, swagfag was refering to another "error" mentionned above [EDIT: fixed link] (admittely this was a ambiguous). Otherwise, you're right: the message of the real error indicates a script structure issue. tatagi Disable warnings or rewrite your script so that the parser does not dete...
by A_AhkUser
01 Oct 2020, 07:38
Forum: Ask for Help (v1)
Topic: Please help complete this script(confining mouse to a window)
Replies: 23
Views: 2043

Re: Please help complete this script(confining mouse to a window)

@tatagi

You might need to simply remove

Code: Select all

!x::ExitApp
on the top of the script (not tested), otherwise I don't see any reason why one should not be able to paste it as such anywhere in any other script the way it is written.

see also: The Top of the Script (the Auto-execute Section)

A_AhkUser
by A_AhkUser
30 Sep 2020, 12:03
Forum: Gaming Help (v1)
Topic: How to alternate between 2 options?
Replies: 3
Views: 900

Re: How to alternate between 2 options?

We could even go further: use merely boolean logic; actually, there's no skip during the loop: the operation can be consider as independent of a_index in this specific case; the value logically alternate between false and true : loop, 10 { ; MsgBox, % a_index " is " ((toggle:=!toggle) ? "odd" : "eve...
by A_AhkUser
30 Sep 2020, 11:56
Forum: Ask for Help (v1)
Topic: Please help complete this script(confining mouse to a window)
Replies: 23
Views: 2043

Re: Please help complete this script(confining mouse to a window)

@tatagi 1. Try this: #NoEnv #Warn SendMode Input SetWorkingDir %A_ScriptDir% #SingleInstance force area := {x: 200, y: 200, w: 700, h: 700} winTitle := "ahk_class Notepad" return !x::ExitApp OnActivate(hMatch) { ; https://docs.microsoft.com/en-us/windows/win32/menurc/using-cursors#confining-a-cursor...
by A_AhkUser
29 Sep 2020, 10:17
Forum: Ask for Help (v1)
Topic: Please help complete this script(confining mouse to a window)
Replies: 23
Views: 2043

Re: Please help complete this script(confining mouse to a window)

The following seems to work (I'm not really familiar with DllCalls and Win API stuffs but gurus might be able to correct the code, as the case may be): #NoEnv #Warn SendMode Input SetWorkingDir %A_ScriptDir% #SingleInstance force winTitle := "ahk_class Notepad" !x::ExitApp OnActivate(hActivation:=-1...
by A_AhkUser
28 Sep 2020, 19:57
Forum: Ask for Help (v1)
Topic: Paste Alternative Script?
Replies: 20
Views: 2212

Re: Paste Alternative Script?

It might be necessary sometimes to use either the raw or text mode : F3::SendInput % "{Text}" . Clipboard Here's a particular case of auto-execute section with a gosub, paradoxically confirming the rule (as for static initializers , they are initialized only once and before even the script begins ex...
by A_AhkUser
28 Sep 2020, 16:25
Forum: Ask for Help (v1)
Topic: move cursor whenever xpos is bigger than 1000
Replies: 8
Views: 782

Re: move cursor whenever xpos is bigger than 1000

would you please tell me what the difference is from w0z's and why it looks a bit complicated? Although in its principle highly correct, w0z 's sample code suffers from an obvious lack: it blindly loops, indiscriminately and continuously. As for a WinEventHook, it allows you to intercept applicatio...
by A_AhkUser
26 Sep 2020, 19:20
Forum: Ask for Help (v1)
Topic: move cursor whenever xpos is bigger than 1000
Replies: 8
Views: 782

Re: move cursor whenever xpos is bigger than 1000

Alternate method, by implementing a winevent hook: myFunction() { MouseGetPos, mx, my if (mx > 1000) MouseMove, 900, % my } winTitle := "ahk_class Notepad" ; https://www.autohotkey.com/docs/misc/WinTitle.htm coordModeMouse := "Screen" ;https://www.autohotkey.com/docs/commands/CoordMode.htm ; <><><><...
by A_AhkUser
26 Sep 2020, 19:07
Forum: Ask for Help (v1)
Topic: call a function inside a class Topic is solved
Replies: 3
Views: 642

Re: call a function inside a class Topic is solved

Hola gerard , % Texto.Hablar() Here, you must remove the trailing single % : it as a special meaning only in command input parameters - to force an expression : Texto.Hablar() ; by default evaluated as an expression in this case by ahk MsgBox % Texto.Hablar() ; forces the expression in a parameter t...
by A_AhkUser
25 Sep 2020, 21:16
Forum: Gaming Help (v1)
Topic: Joystick Hat Switch - multiple hotkeys to change the function
Replies: 1
Views: 460

Re: Joystick Hat Switch - multiple hotkeys to change the function

I'd really like to setup an Autohotkey script that essentially makes each button click reconfigure the hotkeys of the hatswitch to simulate all the different hat switches of fighter jets and things like that. Basically I'd like to do something like this: Press Joy1 = Hat switch Up, Down, Left, Righ...
by A_AhkUser
25 Sep 2020, 14:24
Forum: Ask for Help (v1)
Topic: Gui - Send/paste value while pointer is on another window Topic is solved
Replies: 3
Views: 549

Re: Gui - Send/paste value while pointer is on another window Topic is solved

Hi DanRim, It does what I need. I am glad to know it! May I ask what is the purpose of those arrows up and down? I tried to manipulate a little bit, but could not see the functionality. By clicking up content just disappears. Why I need that? You don't necessary need this feature. Arrows are just he...
by A_AhkUser
24 Sep 2020, 18:58
Forum: Ask for Help (v1)
Topic: Gui - Send/paste value while pointer is on another window Topic is solved
Replies: 3
Views: 549

Re: Gui - Send/paste value while pointer is on another window Topic is solved

For example - I am want to send email and already have stored templates in my GUI, I just need to press button and text should appear on textarea there was my cursor before I clicked the button. Is it possible at all? Not sure if this is compatible with the way you want your GUI to behave but one p...
by A_AhkUser
24 Sep 2020, 18:49
Forum: Gaming Help (v1)
Topic: mapping joystick not working
Replies: 2
Views: 1147

Re: mapping joystick not working

Also "end" should be replaced by return.

A_AhkUser

Go to advanced search