boiler wrote: ↑03 Jan 2020, 18:21For more info, see the documentation on expressions.Code: Select all
test := "10" test1 := test * 1000 Msgbox, %test1%
Search found 45 matches
- 19 Apr 2021, 12:05
- Forum: Ask for Help (v1)
- Topic: Convert String into Number
- Replies: 5
- Views: 13611
Re: Convert String into Number
boiler is saying you don't need special tools to convert. A string "10" assigned to a variable name through expression syntax can be used as a number, as per boiler's example.
- 19 Apr 2021, 11:58
- Forum: Ask for Help (v1)
- Topic: Restart a script every time it is activated
- Replies: 3
- Views: 414
Re: Restart a script every time it is activated
By default, a given hotkey or hotstring subroutine cannot be run a second time if it is already running. Use #MaxThreadsPerHotkey to change this behavior. from https://www.autohotkey.com/docs/misc/Threads.htm You can set #MaxThreadsPerHotkey, 2 at the top of your script. See if you can make it work...
- 19 Apr 2021, 10:43
- Forum: Ask for Help (v1)
- Topic: Call class method with GUI g-label
- Replies: 1
- Views: 152
Call class method with GUI g-label
Hello scripters! I'm working on a new little script which involves creating a number of GUIs inside a class. Running through some concepts and I seem to be unable to reference the class methods with a GUI g-label. As expected - not using classes at all - this works: gui, add, text, ghello, click me ...
- 30 Jan 2021, 13:04
- Forum: Ask for Help (v1)
- Topic: Autohotkey not working properly?
- Replies: 11
- Views: 581
Re: Autohotkey not working properly?
It looks like you have Notepad set as the default to execute .ahk files. You can search for "default apps" in your Start menu search box to check.
- 30 Jan 2021, 13:01
- Forum: Ask for Help (v1)
- Topic: Active Window Always On Top, Off Top if no more ative
- Replies: 2
- Views: 148
Re: Active Window Always On Top, Off Top if no more ative
Could you wrap your script in code tags for easier reading? Can you say what isn't working right now? - is the name of the active window updated with the "active -" prefix? - if you change focus to a different window, are the names of both windows updated correctly? - can a window lose focus while s...
- 30 Jan 2021, 12:37
- Forum: Ask for Help (v1)
- Topic: Need to send characters {} <>
- Replies: 4
- Views: 222
Re: Need to send characters {} <>
The default escape character in Autohotkey is a backtic:
So sending the following should work:
I don't think you need to escape angle brackets or forward slashes, but not on a PC right now so can't test.
Code: Select all
`
Code: Select all
`{JSFoundset<db:/dbname/tablename>`}
- 30 Jan 2021, 08:18
- Forum: Ask for Help (v1)
- Topic: Unquoted strings, *sigh*
- Replies: 6
- Views: 367
Re: Unquoted strings, *sigh*
The forum rules don't allow me to express my feelings... Well said :mrgreen: I have felt the same way. I'm sure you've figured this out but it helps to choose one method and stick with it. If you like the simple = and don't mind prefacing expressions with %, go for that. If you like walruses and do...
- 30 Jan 2021, 08:02
- Forum: Ask for Help (v1)
- Topic: Copying highlighted text in Acrobat to different window in MS Word...
- Replies: 13
- Views: 1116
- 29 Jan 2021, 04:16
- Forum: Ask for Help (v1)
- Topic: Clipboard overwriting
- Replies: 5
- Views: 278
Re: Clipboard overwriting
AHK is smart enough to not execute a command until the previous command has finished. Basically, for every command in your script, AHK waits for Windows to say "I have done what you wanted" before executing the next line. However, when you send the key combination ^c, your system will say "I have do...
- 29 Jan 2021, 03:52
- Forum: Ask for Help (v1)
- Topic: Clipboard overwriting
- Replies: 5
- Views: 278
Re: Clipboard overwriting
Clipwait only waits for the clipboard to contain anything. It doesn't detect change.
Try adding a before the second ^c.
Try adding a
Code: Select all
clipboard=
- 29 Jan 2021, 03:48
- Forum: Ask for Help (v1)
- Topic: Is it possible to "Inject a button class" on a window?
- Replies: 8
- Views: 654
Re: Is it possible to "Inject a button class" on a window?
I don't think this is possible. If a GUI button is not accessible by its name or ID or (in case of IE) through the DOM, there's not much AHK can do with it directly. A workaround would be to bind a single hotkey to: - activate and resize the window - click the location of the button - minimise the w...
- 29 Jan 2021, 03:43
- Forum: Ask for Help (v1)
- Topic: Copying highlighted text in Acrobat to different window in MS Word...
- Replies: 13
- Views: 1116
- 29 Jan 2021, 03:39
- Forum: Ask for Help (v1)
- Topic: Copying highlighted text in Acrobat to different window in MS Word...
- Replies: 13
- Views: 1116
Re: Copying highlighted text in Acrobat to different window in MS Word...
I would suggest using ^c and ^v instead of the keyname plus down or up; and also to add a sleep or clipwait after sending ^c. Instead of using alt-tab you can use winactivate, so Adobe and Word don't need to be next to each other in your Z-stack (say in case you manually alt-tab to something else in...
- 29 Jan 2021, 03:34
- Forum: Ask for Help (v1)
- Topic: Clipboard overwriting
- Replies: 5
- Views: 278
Re: Clipboard overwriting
Try using a sleep (crude) or clipwait after each ^c.
- 29 Jan 2021, 03:32
- Forum: Ask for Help (v1)
- Topic: Blank parameter error Topic is solved
- Replies: 4
- Views: 815
Re: Blank pararmeter error Topic is solved
If you want to use the default value of the 2nd parameter but specify the 3rd, you need to let ahk know that explicitly by leaving one argument empty. If you want to use the default value of the 3rd parameter you should omit it entirely, i.e. not place a comma after the 2nd argument when calling. On...
- 29 Jan 2021, 03:18
- Forum: Ask for Help (v1)
- Topic: Recording keys being held down.
- Replies: 1
- Views: 92
Re: Recording keys being held down.
What you're describing is normal Windows behaviour when holding down a key.
Could you say which key it is? Do you need it to also perform its normal action on a single press, in addition to a different behaviour when holding it down?
- P
Could you say which key it is? Do you need it to also perform its normal action on a single press, in addition to a different behaviour when holding it down?
- P
- 25 Jul 2020, 00:56
- Forum: Gaming Help (v1)
- Topic: Script sending to two windows with the same name
- Replies: 2
- Views: 773
Re: Script sending to two windows with the same name
Presumably you're only running this script while playing, right? In that case you don't need to use #ifwinactive. Can you try the following (untested, sorry), run this script _after_ you run both instances of WoW: Loop { ControlSend,,{w down},World of Warcraft,,A RandomSleep(2000,5000) ControlSend,,...
- 25 Jul 2020, 00:46
- Forum: Ask for Help (v1)
- Topic: Why is my control click not working?
- Replies: 7
- Views: 4545
Re: Why is my control click not working?
Try it with a mousemove to the coordinates you're using, and a regular click (not controlclick) to see if your coords are good. Obviously the target window needs to be active for this. If it turns out that the coords were wrong, I recommend using windowSpy (built in to autohotkey) to find the coords...
- 26 Jan 2020, 06:54
- Forum: General Discussion
- Topic: Tank needs a little help
- Replies: 19
- Views: 8563
Re: Tank needs a little help
Sorry to hear this sir! Your COM tutorial was a godsend. I will be contributing.
Hope you find something else soon!
Hope you find something else soon!
- 23 Jan 2020, 11:28
- Forum: Ask for Help (v1)
- Topic: GUI CheckBox hotkey and timer
- Replies: 3
- Views: 601
Re: GUI CheckBox hotkey and timer
Hi, I like this idea. I wrote a script quickly that tackles this but requires 2 global vars, which is not ideal. This can definitely be improved upon by someone with more time and/or experience than me. #noenv #singleinstance,force global started := 0 gui,keytrigger:new gui,add,text,xm ym+3 w80 r1,B...