Search found 29 matches

by mshafer1
28 Mar 2019, 19:12
Forum: Scripts and Functions
Topic: Using AutoHotkey from Python
Replies: 5
Views: 1875

Re: Using AutoHotkey from Python

Awesome! I'd been putting off taking one of those and upgrading it to Python3 myself.
by mshafer1
24 Aug 2018, 06:25
Forum: Scripts and Functions
Topic: Cycle through active program-if not open, open program
Replies: 1
Views: 429

Re: Cycle through active program-if not open, open program

First: https://autohotkey.com/boards/viewtopic.php?f=6&t=34663 Also: (untested) https://www.ahkgen.com/?length=1&comment0=&func0=KEY&skeyValue0=F3&Code0=%0D%0A%09next+%3D+GetNextProgram%28%29%0D%0A%09get_exe_name+%3D+GetExe%28next%29%3B%0D%0A%09%3B+MsgBox%2C+Next+Program%3A+%25next%25%60nExe%3A+%25g...
by mshafer1
22 Jul 2018, 13:25
Forum: Ask For Help
Topic: Ctrl G + Spacebar = V
Replies: 2
Views: 435

Re: Ctrl G + Spacebar = V

I'm not sure if your asking for CTRL + G + Space = v, or CTRL + Space = v, but if it is the latter - then here is a sample of code that works. https://www.ahkgen.com/?length=1&comment0=CTRL+%2B+Space+%3D+v&func0=KEY&skey0%5B%5D=CTRL&skeyValue0=Space&input0=v&option0=Send If asking for CTRL + G + Spa...
by mshafer1
22 Jul 2018, 07:34
Forum: Scripts and Functions
Topic: Guidelines: sharing code, no pranks, etc.
Replies: 9
Views: 9802

Re: Guidelines: sharing code, no pranks, etc.

In order to share your script in the "Scripts and Functions" forums, it is necessary to share the source code of your script in some form. It is not enough to share compiled .exe files - though it is possible to extract the source from them. Obfuscating your Source Code using any sort of method is ...
by mshafer1
17 Jun 2018, 07:33
Forum: Ask For Help
Topic: Help on writing a specific script
Replies: 6
Views: 827

Re: Help on writing a specific script

Because there is a hotkey defined, you don't need #persistent

Code: Select all

1::
    Send, d
    Sleep, 700
    MouseMove, 0,70,,R
    Click
    Sleep, 100
    Send, d
    Sleep, 700
    MouseMove, 0,-70,,R
    Click
    return
This works on my machine (with or without the sleep)
by mshafer1
16 Jun 2018, 21:24
Forum: Ask For Help
Topic: (Script) Set a delay
Replies: 22
Views: 2477

Re: (Script) Set a delay

Because AHK would get notified by the same Windows event (if using the mouse), AHK cannot make you click with a faster response than the mouse. If you were to grammatically decide when to click, you could do that on the order of machine time (much faster than a human ever will), but that is extremel...
by mshafer1
16 Jun 2018, 21:19
Forum: Ask For Help
Topic: Help on writing a specific script
Replies: 2
Views: 375

Re: Help on writing a specific script

If you use the scan code (https://autohotkey.com/docs/KeyList.htm#sc) you can specify keys more precisely (including ones that aren't included in the language by default). On my keyboard (and I suspect on yours) - numeric 1 (not the numpad 1) has a scan code of 002, so you can use this version inste...
by mshafer1
16 Jun 2018, 21:17
Forum: Ask For Help
Topic: How to detect a specific window and execute only if open
Replies: 2
Views: 473

Re: How to detect a specific window and execute only if open

Check this out: (untested - but should do exactly what you asked for) https://www.ahkgen.com/?length=1&comment0=focus+gimp&func0=KEY&skey0%5B%5D=CTRL&skey0%5B%5D=ALT&skeyValue0=g&Code0=%0D%0A++++IfWinExist%2C+ahk_exe+gimp.exe%0D%0A++++%7B%0D%0A++++++++WinActivate+%3B+uses+last+found+window+-+Gimp+in...
by mshafer1
16 Jun 2018, 21:11
Forum: Ask For Help
Topic: Help on writing a specific script
Replies: 6
Views: 827

Re: Help on writing a specific script

(tested) - use this version If you use the scan code (https://autohotkey.com/docs/KeyList.htm#sc) you can specify keys more precisely (including ones that aren't included in the language by default). On my keyboard (and I suspect on yours) - numeric 1 (not the numpad 1) has a scan code of 002, so yo...
by mshafer1
16 Jun 2018, 20:52
Forum: Ask For Help
Topic: Help on writing a specific script
Replies: 6
Views: 827

Re: Help on writing a specific script

This probably should be in the Ask For Help forum . . . That being said - try this script out https://www.ahkgen.com/?length=1&comment0=&func0=KEY&skeyValue0=1&Code0=%0D%0A++++Loop%2C+%3B+loop+forever%0D%0A++++++++Send%2C+d%0D%0A++++++++Sleep%2C+7000+%3B+7%2C000+ms+%3D+7+s%0D%0A++++++++%0D%0A+++++++...
by mshafer1
15 Jun 2018, 14:59
Forum: Ask For Help
Topic: Need a very simple 'script' but i'm dumb
Replies: 4
Views: 612

Re: Need a very simple 'script' but i'm dumb

That looks like this : sleep, 1000 (1000 is milliseconds ?) , i put the delay after the comma ? Yes - that will cause a 1s delay (so for a small delay, maybe consider 30 (if its not a Windows/program time you're allowing for), or 500 (if it is a window/program time you're allowing to catch up), or ...
by mshafer1
15 Jun 2018, 14:38
Forum: Ask For Help
Topic: Need a very simple 'script' but i'm dumb
Replies: 4
Views: 612

Re: Need a very simple 'script' but i'm dumb

That sounds like ~$a up::Send, D ~$d up::Send, A (testedA - seems to work asD asDkedA for) :) ahkgen link: https://www.ahkgen.com/?length=2&comment0=releasing+a+sends+D&func0=KEY&skeyValue0=~%24a+up&input0=D&option0=Send&comment1=releasing+d+sends+A&func1=KEY&skeyValue1=~%24d+up&input1=A&option1=Send
by mshafer1
15 Jun 2018, 14:32
Forum: Ask For Help
Topic: Can I hire someone for two super-simple scripts?
Replies: 10
Views: 1508

Re: Can I hire someone for two super-simple scripts?

Yes, the "Provided Functions" is a set of methods that are added to the script to build up on top of what AHK provides by default (and, yes ActivateOrOpen is one of the added methods). - and no, you do not need to include any functions that you don't need, so you could copy just the Configuration Re...
by mshafer1
15 Jun 2018, 12:58
Forum: Scripts and Functions
Topic: [AutoHotkey Programming Tools] + awesome-AutoHotkey list.
Replies: 102
Views: 104176

Re: [AutoHotkey Programming Tools] + awesome-AutoHotkey list.

joedf wrote:Perhaps simply Miscellaneous then? :think:
Works for me :)
by mshafer1
15 Jun 2018, 09:14
Forum: Ask For Help
Topic: (Script) Set a delay
Replies: 22
Views: 2477

Re: (Script) Set a delay

When you say the one that clicks faster wins, is it like a ready, set, go and you want to hit the button first? - in that case, no, that is much harder to do with just AHK - you need something to detect when it's time to click Is it the person who gets the most click in the fastest wins? sure LButto...
by mshafer1
15 Jun 2018, 07:34
Forum: Ask For Help
Topic: Please help with LOOP Topic is solved
Replies: 4
Views: 643

Re: Please help with LOOP Topic is solved

It think the issue is just a syntactical/formatting difficulty Loop { GetKeyState, state, NumpadEnd GetKeyState, state2, 1 if( state = D and state2 = D ) ; It is checked if the keys are pressed Loop ; If the keys are pressed, then it is checked whether they are released { if ( state = U and state2 =...
by mshafer1
15 Jun 2018, 07:28
Forum: Ask For Help
Topic: Can I hire someone for two super-simple scripts?
Replies: 10
Views: 1508

Re: Can I hire someone for two super-simple scripts?

Thank you for all the help, Wolf II. I really appreciate your helping me even though I'm so clueless. I've made some progress. My second script was for moving around within one spreadsheet. From what I learned from your model script for my first task, I was able to create various versions of moving...
by mshafer1
14 Jun 2018, 15:39
Forum: Ask For Help
Topic: (Script) Set a delay
Replies: 22
Views: 2477

Re: (Script) Set a delay

Click the download link - if you have AHK installed, you should be able to run it - it's set to do a 2s delay whenever the CTRL + Click then click (you could take the ^ out of the trigger to make it just a click to trigger), click, try to move the mouse, try to click, note that it actually clicks af...
by mshafer1
14 Jun 2018, 14:41
Forum: Ask For Help
Topic: (Script) Set a delay
Replies: 22
Views: 2477

Re: (Script) Set a delay

Like this?

Code: Select all

$^LButton::
    ; prevent user from moving mouse from where the click was triggered
    BlockInput MouseMove
    Sleep, 2000 ; delay 2 s
    Click
    BlockInput MouseMoveOff
    return ; block the original click
by mshafer1
14 Jun 2018, 11:34
Forum: Ask For Help
Topic: (Script) Set a delay
Replies: 22
Views: 2477

Re: (Script) Set a delay

Are you trying to delay the click? or delay an action?

I'm not sure on the first, but the latter would be

Code: Select all

LButton::
    Sleep, 500 ; delay 1/2 s
    MsgBox, You clicked a little while ago!
    return

Go to advanced search