Search found 45 matches

by Pepineros
19 Apr 2021, 12:05
Forum: Ask for Help (v1)
Topic: Convert String into Number
Replies: 5
Views: 13548

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.
boiler wrote:
03 Jan 2020, 18:21

Code: Select all

test := "10"
test1 := test * 1000
Msgbox, %test1%
For more info, see the documentation on expressions.
by Pepineros
19 Apr 2021, 11:58
Forum: Ask for Help (v1)
Topic: Restart a script every time it is activated
Replies: 3
Views: 410

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...
by Pepineros
19 Apr 2021, 10:43
Forum: Ask for Help (v1)
Topic: Call class method with GUI g-label
Replies: 1
Views: 149

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 ...
by Pepineros
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.
by Pepineros
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...
by Pepineros
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:

Code: Select all

`
So sending the following should work:

Code: Select all

`{JSFoundset<db:/dbname/tablename>`}
I don't think you need to escape angle brackets or forward slashes, but not on a PC right now so can't test.
by Pepineros
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...
by Pepineros
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: 1113

Re: Copying highlighted text in Acrobat to different window in MS Word...

boiler wrote:
29 Jan 2021, 07:18
...the point about not having DOWN with some of the keys is still valid because it would release the key (essentially perform a down and up) before sending the next key.
Absolutely! You fixed OP's script. Shame they didn't reply.
by Pepineros
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...
by Pepineros
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

Code: Select all

clipboard=
before the second ^c.
by Pepineros
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...
by Pepineros
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: 1113

Re: Copying highlighted text in Acrobat to different window in MS Word...

boiler wrote:
28 Jan 2021, 23:52
You need a space between the key name and DOWN or UP.
I don't think that's true. It should work with or without space between {keyname} and key.
by Pepineros
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: 1113

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...
by Pepineros
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.
by Pepineros
29 Jan 2021, 03:32
Forum: Ask for Help (v1)
Topic: Blank parameter error Topic is solved
Replies: 4
Views: 803

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...
by Pepineros
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
by Pepineros
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,,...
by Pepineros
25 Jul 2020, 00:46
Forum: Ask for Help (v1)
Topic: Why is my control click not working?
Replies: 7
Views: 4535

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...
by Pepineros
26 Jan 2020, 06:54
Forum: General Discussion
Topic: Tank needs a little help
Replies: 19
Views: 8537

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!
by Pepineros
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...

Go to advanced search