Search found 45 matches
- 23 Jan 2020, 06:11
- Forum: Ask for Help (v1)
- Topic: Help, im new here !
- Replies: 1
- Views: 268
Re: Help, im new here !
Welcome to the forum! i press f1 and the script turn on exactly script that i want. Assigning F1 to perform an action is very simple in AHK. I'm not sure what you mean by "turning on a script". Are you looking to create a master script with hotkeys that run separate scripts, which in turn perform ot...
- 23 Jan 2020, 01:44
- Forum: Ask for Help (v1)
- Topic: Help on using a context menu selection to click on specific coordinates Topic is solved
- Replies: 5
- Views: 1466
Re: Help on using a context menu selection to click on specific coordinates Topic is solved
As a general rule, build your menu once (in the autoexec part of the script), then use a hotkey only to show it. #noenv #singleinstance,force menu,channelmenu,add,Save,click1 menu,channelmenu,add,Open new,click2 menu,channelmenu,add,Select,click3 appskey:: winactivate,the application you want to cli...
- 22 Jan 2020, 13:07
- Forum: Ask for Help (v1)
- Topic: Winmove moves Notepad but not browsers
- Replies: 5
- Views: 695
Re: Winmove moves Notepad but not browsers
Both your first method and the method I posted work fine for me. Could that mean it's related to authorisation / administrator situation? I don't know why that would block me from moving IE but not Notepad... I have admin rights on this system but it is a work laptop so difficult to say exactly how...
- 22 Jan 2020, 12:38
- Forum: Ask for Help (v1)
- Topic: Winmove moves Notepad but not browsers
- Replies: 5
- Views: 695
Re: Winmove moves Notepad but not browsers
Thanks HTH but same result I'm afraid. WinWaitActive ends much sooner than after 3 seconds (I added a tooltip after the winwaitactive line returning the PID) and the window does not move or resize.
- 22 Jan 2020, 12:35
- Forum: Ask for Help (v1)
- Topic: Help on using a context menu selection to click on specific coordinates Topic is solved
- Replies: 5
- Views: 1466
Re: Help on using a context menu selection to click on specific coordinates Topic is solved
Oh wait, I think I understand now. You're trying to automate a specific application that the screen reader doesn't work on. This should not be difficult, provided that you know the size of the application (so every clickable thing on your screen is always in the same place). No time to post full cod...
- 22 Jan 2020, 12:33
- Forum: Ask for Help (v1)
- Topic: Help on using a context menu selection to click on specific coordinates Topic is solved
- Replies: 5
- Views: 1466
Re: Help on using a context menu selection to click on specific coordinates Topic is solved
Hi Thomas! If I understand correctly, you would have a context menu with for example: - Start Chrome - New email - Start MS Word Now if you hit Enter on the first option, you want the mouse to click the coordinates of the shortcut to Chrome on your desktop. If you hit Enter on the second option, you...
- 22 Jan 2020, 12:27
- Forum: Ask for Help (v1)
- Topic: Noob question Topic is solved
- Replies: 4
- Views: 467
Re: Noob question Topic is solved
If the result you need is always the first 3 characters of your output, you can simply use: output := "360 /km2 (980 /sq mi)" result := substr(output,1,3) If the result is the first x characters up to the first space, you can do: output := "360 /km2 (980 /sq mi)" endpos := instr(output, " ") -1 resu...
- 22 Jan 2020, 12:15
- Forum: Ask for Help (v1)
- Topic: help with calculate size
- Replies: 4
- Views: 561
Re: help with calculate size
Another idea which would be more flexible: if your variable contains "50mb" you could parse that to separate the number from the letters and act on the result.
Don't have time now to write the code out but will star this and try to come back to it, if nobody beats me to it.
Don't have time now to write the code out but will star this and try to come back to it, if nobody beats me to it.
- 22 Jan 2020, 12:10
- Forum: Ask for Help (v1)
- Topic: help with calculate size
- Replies: 4
- Views: 561
Re: help with calculate size
AHK doesn't understand what mb, gb etc mean. It stores 1gb and 50mb as text strings, not numerical values, so there's no way for this code to work in this manner. You could assign a byte value to each abbreviation and use a slightly different conditional: kb := 1000 mb := 1000000 gb := 1000000000 x ...
- 22 Jan 2020, 10:47
- Forum: Ask for Help (v1)
- Topic: Winmove moves Notepad but not browsers
- Replies: 5
- Views: 695
Winmove moves Notepad but not browsers
With one instance of Notepad running, the below code works: #noenv #singleinstance,force sendmode,input run,notepad.exe,,,new_pid sleep,3000 winmove,ahk_pid %new_pid%,,0,0,1000,800 Notepad runs and is moved & resized after the sleep. The following code does not work: #noenv #singleinstance,force sen...
- 16 Dec 2018, 16:45
- Forum: Ask for Help (v1)
- Topic: Msgbox to block user input
- Replies: 2
- Views: 655
Re: Msgbox to block user input
Thanks Wolf! I was already using something very similar. Your example did exactly what I needed so I dug a little deeper. Turned out the gui, +OwnDialogs I had was targeting the wrong GUI. Fixed by using gui,sass:+OwnDialogs where sass is the name of the GUI it should be targeting. Thanks for pointi...
- 16 Dec 2018, 16:24
- Forum: Ask for Help (v1)
- Topic: Msgbox to block user input
- Replies: 2
- Views: 655
Msgbox to block user input
Hi all, I wasn't able to find an answer to this question, possibly because I'm not sure how to ask it in a way Google understands. Many applications can throw errors that prevent the user from interacting with the applications until they dismiss the error. Is it possible to do a similar thing with a...
- 27 Nov 2018, 02:03
- Forum: Ask for Help (v1)
- Topic: Hotkey to kill a looping thread in the same script
- Replies: 3
- Views: 1313
Re: Hotkey to kill a looping thread in the same script
this is jank. dont do this Creative jank! Is there a command which will kill a looping thread contained in the same script without actually killing/closing the script ? Not that I'm aware of. If reloading is OK (which is really killing & restarting your script, so maybe this is not the solution you...
- 27 Nov 2018, 00:44
- Forum: Ask for Help (v1)
- Topic: Use ..\.. for directory?
- Replies: 3
- Views: 797
Re: Use ..\.. for directory?
The script is trying to find the directory where AutoHotkey.chm is stored.I assume it checks up 1 directory level just above where your screenshot cuts off? Then checks up 2 levels, then checks the Program Files folder.
- 26 Nov 2018, 01:42
- Forum: Ask for Help (v1)
- Topic: Get content of GUI edit controls using loop Topic is solved
- Replies: 2
- Views: 1037
- 25 Nov 2018, 16:41
- Forum: Ask for Help (v1)
- Topic: Indicate on the screen Topic is solved
- Replies: 13
- Views: 3125
Re: Indicate on the screen Topic is solved
Hi Amanda, Your English is fine :) You need the files called icon1.ico and icon2.ico in the working_dir of your script in order for AlphaBravo's code to work. You can make your own icons using MS Paint or download them online. EDIT: you can name the .ico files whatever you want of course, just chang...
- 25 Nov 2018, 16:37
- Forum: Ask for Help (v1)
- Topic: Send Ctrl + LButton
- Replies: 3
- Views: 1272
Re: Send Ctrl + LButton
If you say
or, more ridiculously
will bind the F1 key to trigger the label called "Mbutton" and send ctrl + left mouse button.
Code: Select all
Mbutton::
send, ^Lbutton
return
Code: Select all
Mbutton:
send, ^Lbutton
return
F1::gosub Mbutton
- 25 Nov 2018, 16:32
- Forum: Ask for Help (v1)
- Topic: Get content of GUI edit controls using loop Topic is solved
- Replies: 2
- Views: 1037
Get content of GUI edit controls using loop Topic is solved
Hi all, I have a GUI with four Edit controls where the user can input data, and a subroutine that checks the contents of every Edit control; if empty, don't do anything, if not empty, append the contents of the edit control and the related text element to clipboard. For the sake of learning somethin...
- 19 Nov 2018, 15:28
- Forum: Ask for Help (v1)
- Topic: My timer script Topic is solved
- Replies: 7
- Views: 1821
Re: My timer script Topic is solved
Thanks wolf, that does exactly what I need!
I shall go forth and learn about Format()![Thumbup :+1:](./images/smilies/icon_thumbup.gif)
I shall go forth and learn about Format()
![Thumbup :+1:](./images/smilies/icon_thumbup.gif)
- 18 Nov 2018, 23:46
- Forum: Ask for Help (v1)
- Topic: My timer script Topic is solved
- Replies: 7
- Views: 1821
Re: My timer script Topic is solved
Update on question 1 Yesterday after restarting the window was showing a client width of 120 and window width of 126 in Windowspy. After I finished working I shut down, booted up again just now, and guess what... back to 150/156. I can work around it by letting the script grab the window size inste...