Search found 136 matches
- 19 Jul 2020, 12:22
- Forum: Scripts and Functions (v1)
- Topic: Get monitor that mouse is in
- Replies: 36
- Views: 14403
Re: Get monitor that mouse is in
Maybe the safest way is to get active window's position+size in a RECT using GetWindowRect() and then call MonitorFromRect() . That's because contrary to what is suggested above the latter "retrieves a handle to the display monitor that has the largest area of intersection with a specified rectangl...
- 19 Jul 2020, 05:45
- Forum: Ask for Help (v1)
- Topic: Help with edit and v-label
- Replies: 2
- Views: 1700
Re: Help with edit and v-label
#InstallKeybdHook #UseHook gui, add, edit, x20 y30 w400 h20 vSlot1 gui, add, edit, x20 y70 w400 h20 vSlot2 gui, add, Button, x500 y30 w50 h20, OK Gui, Show, w600 h500, TEST return ButtonOK: gui, submit, NoHide return GuiClose: ExitApp $numpad1:: send %Slot1% $numpad2:: send %Slot2% Hi, I'm trying t...
- 19 Jul 2020, 04:13
- Forum: Scripts and Functions (v1)
- Topic: Get monitor that mouse is in
- Replies: 36
- Views: 14403
Re: Get monitor that mouse is in
Hah, that's so funny, I was looking at this thread yesterday because I needed the function. Hi all, Can anyone help me convert the code from the first post in this thread so that it determines which monitor the active window is on? The code currently determines which monitor the mouse cursor is on. ...
- 18 Jul 2020, 02:07
- Forum: Ask for Help (v1)
- Topic: How to disable the shift key? Topic is solved
- Replies: 7
- Views: 4544
Re: How to disable the shift key? Topic is solved
For some reason what you just said works. But now I'm just more confused. Why does LShift:: do something different than Shift:: ? Is there some explanation on the AHK website, or can you give one? I do still want to capitalize letters, but that part of my script I got working already. Anyway thanks...
- 17 Jul 2020, 09:18
- Forum: Ask for Help (v1)
- Topic: How to disable the shift key? Topic is solved
- Replies: 7
- Views: 4544
Re: How to disable the shift key? Topic is solved
All the ~ prefix does, is
should completely disable the shift-key, but your current description is completely different, you don't want to do capitalization anymore?
, so that's not what you are looking for.when the hotkey fires, its key's native function will not be blocked
Code: Select all
LShift::return
- 17 Jul 2020, 07:01
- Forum: Ask for Help (v1)
- Topic: How to disable the shift key? Topic is solved
- Replies: 7
- Views: 4544
Re: Why doesn't this disable the Shift key? Topic is solved
This doesn't seem to do anything. For some reason, I can't make it so that the shift key won't capitalize letters if I'm holding it down, even regardless of the tilde (~). Does anyone have another solution? However, I need to have the tilde (~) before shift::, because I found out that the script on...
- 16 Jul 2020, 16:00
- Forum: Ask for Help (v1)
- Topic: How to disable the shift key? Topic is solved
- Replies: 7
- Views: 4544
Re: Why doesn't this disable the Shift key? Topic is solved
try this:
Code: Select all
Shift::
toggle := !toggle
if toggle
settimer, timer_shift
else
settimer, timer_shift, off
return
timer_shift:
Send, {Shift up}
return
- 16 Jul 2020, 01:27
- Forum: Ask for Help (v1)
- Topic: Script often overflow and not finish. Topic is solved
- Replies: 3
- Views: 2091
Re: Script often overflow and not finish. Topic is solved
:ugeek: Hello, I have a problem with a script, it continues and sometimes force restart the PC and other times produce overflow. .... any expert please, Thanks. SendMode Input ~LButton::RButton return End::ExitApp Thanks :oops: Hi there! I don't understand the problem. Can you explain in different ...
- 16 Jul 2020, 01:24
- Forum: Ask for Help (v1)
- Topic: Question about time interval script
- Replies: 10
- Views: 4346
Re: Question about time interval script
... Thank you for the help and for the explanation of the code! This works well. The only thing not working for me is the reset every 3 seconds but i think i can do the rest myself. You're welcome! Weird that the reset isn't working for you, it was working for me when I tested it. How are you testi...
- 15 Jul 2020, 14:51
- Forum: Ask for Help (v1)
- Topic: Hold Alt while pressing F4
- Replies: 6
- Views: 2732
Re: Hold Alt while pressing F4
ah, you need an IfWinExist / WinActivate before sending the ALT-F4, I thinkrecyclingeek wrote: ↑15 Jul 2020, 14:01the amount of the Alt f4 to exit the program is random depending on which screen is the software on.How does it keep getting interfered with?
- 15 Jul 2020, 12:03
- Forum: Ask for Help (v1)
- Topic: How do I calculate something after Send Topic is solved
- Replies: 8
- Views: 3147
Re: How do I calculate something after Send Topic is solved
no worries, glad you found the issue!Robbl wrote: ↑15 Jul 2020, 08:43Okay, I got it.
The Problem was this part before the loop:
My "kill switch"Code: Select all
+a:: ExitApp Return
I put it after the loop and now the date is written.
Fantastic! Thanks for your patience
- 15 Jul 2020, 08:26
- Forum: Ask for Help (v1)
- Topic: How do I calculate something after Send Topic is solved
- Replies: 8
- Views: 3147
Re: How do I calculate something after Send Topic is solved
Thanks Maestr0, my code is working (at least the calculation after I put it into brackets). Only the date isn't appearing. To clarify: in the MsgBox it is, but not in the Send. I need the Send command in my code because I want to replace some highlighted text. Any ideas why the date is left out? Th...
- 15 Jul 2020, 08:24
- Forum: Ask for Help (v1)
- Topic: Question about time interval script
- Replies: 10
- Views: 4346
Re: Question about time interval script
... Thank you for the help and for the explanation of the code! This works well. The only thing not working for me is the reset every 3 seconds but i think i can do the rest myself. You're welcome! Weird that the reset isn't working for you, it was working for me when I tested it. How are you testi...
- 15 Jul 2020, 08:23
- Forum: Ask for Help (v1)
- Topic: Question about time interval script
- Replies: 10
- Views: 4346
Re: Question about time interval script
@Maestr0 I have thoroughly tested my code again. No malfunction whatsoever! Where/when do you experience a malfunction? I did not get an error, it just didn't show me the numbers. Now that I tested it again, it worked. Ah, I remember now what I did, I made a msgbox instead of a tooltip, and I must ...
- 15 Jul 2020, 08:02
- Forum: Ask for Help (v1)
- Topic: Correct usage of A_ScriptDir
- Replies: 6
- Views: 4742
- 15 Jul 2020, 08:00
- Forum: Ask for Help (v1)
- Topic: AHK Script stopped working - SOLVED!! THANK YOU!
- Replies: 5
- Views: 22196
Re: AHK Script stopped working
AHK was working fine when it suddenly stopped working. Clicking on the script.ahk started opening the notepad edit window instead of running the script. I have uninstalled and re-installed AHK twice, and then installed an earlier version, all to no avail. I have copied my script into a new .ahk fil...
- 15 Jul 2020, 06:59
- Forum: Ask for Help (v1)
- Topic: Repeating two separate keystrokes every second...?
- Replies: 12
- Views: 3662
Re: Repeating two separate keystrokes every second...?
As for what you did wrong in the code, you put #persistent between the loop and the first { which effectively broke that part. Not quite, this actually loops the { } -block (or the next relevant line): Loop #Persistent { msgbox } Sure, it's not nice and perhaps a bit misleading, but since #persiste...
- 15 Jul 2020, 06:58
- Forum: Ask for Help (v1)
- Topic: Splitting a script?
- Replies: 5
- Views: 2390
Re: Splitting a script?
Unless you use IE (urkh) your script can't read what's on a page. I'm pretty sure that's a security thing. That's not true anymore nowadays - you can do a number of things to automate other browsers (even headless): Chrome.ahk for Chrome, Opera, the new Edge; there is also Selenium , Acc.ahk , ... ...
- 15 Jul 2020, 06:56
- Forum: Ask for Help (v1)
- Topic: Correct usage of A_ScriptDir
- Replies: 6
- Views: 4742
Re: Correct usage of A_ScriptDir
Or this:
Or this:
But I'd use a full path like teadrinker suggested, myself.
Code: Select all
Run "C:\Program Files\VideoLan\Vlc\Vlc.exe" test.mp3, %A_ScriptDir%
Code: Select all
SetWorkingDir, %A_ScriptDir%
Run "C:\Program Files\VideoLan\Vlc\Vlc.exe" test.mp3
- 15 Jul 2020, 05:08
- Forum: Ask for Help (v1)
- Topic: simulate keyboard press
- Replies: 8
- Views: 3957
Re: simulate keyboard press
Is it possible to make the script so that when you press the button (which is assigned to launch the script), the script is being executed, but when you release the button the script stops? When the script is executed it then reads if 'a' is being pressed it should output 'b' (for ex.). If the scri...