Search found 553 matches

by 4GForce
01 Feb 2017, 05:09
Forum: Ask For Help
Topic: Use AHK to close a MsgBox that it opened.
Replies: 5
Views: 3250

Re: Use AHK to close a MsgBox that it opened.

Allowing multiple thread for hotkeys can be risky. I'd rather use a timer to open the message box in a new thread. #SingleInstance force #noenv F12::magicKeyPressed() helpMe: showHelp() Return ExitApp magicKeyPressed() { IfWinExist Help WinClose Else SetTimer, helpMe, -10 ; negative delay so it will...
by 4GForce
01 Feb 2017, 04:41
Forum: Ask For Help
Topic: [Solved] How to check if an object has a property (when there are empty strings involved)?
Replies: 6
Views: 4937

Re: [Solved] How to check if an object has a property (when there are empty strings involved)?

I'm C# background too and I always fall in some AHK trap somewhere

Code: Select all

if True == True 
{
	; This will never run
}
else 
{
	str1 := "098"
	str1 += "765"
	str2 := "CON"
	str2 += "CAT"
	msgbox % "Also carefull about shortcuts, str1 result is " . str1 . "`nWhich almost makes sense but str2 is " . str2
}
by 4GForce
01 Feb 2017, 04:23
Forum: Ask For Help
Topic: Frame1 - Why can't write user and password into imput box
Replies: 10
Views: 2252

Re: Why can't write user and password into imput box

Your code is working fine, don't change a thing ! Just make sure that FORicerca is accessible in the context where its called global FORicerca ; if needed or pass it thru params either that or your activeX is not working properly, can't tell without the rest of the code, but it was working fine on m...
by 4GForce
01 Feb 2017, 03:57
Forum: Ask For Help
Topic: Enable_Disable Control Panel and Settings using AutoHotkey
Replies: 6
Views: 1641

Re: Enable_Disable Control Panel and Settings using AutoHotkey

I don't feel like swapping users and actually testing this, but I know it used to work ... could be a starting point for you to test : RunAsAdmin() { ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA" if not A_IsAdmin { If A_IsCompiled DllCall(ShellExecute, uint, 0, str, "R...
by 4GForce
01 Feb 2017, 03:44
Forum: Ask For Help
Topic: Console key Topic is solved
Replies: 2
Views: 586

Re: Console key Topic is solved

To identify a key: 1- Run this small script ... #UseHook F1::ExitApp 2- Then double click the script icon in the taskbar 3- From the menu go to View -> Key history and script Info 4- Type your mysterious key then press F5 to refresh You can either use the SC### code or just copy/paste the symbol ......
by 4GForce
01 Feb 2017, 01:03
Forum: Ask For Help
Topic: Need Help (Error :Duplicate Hotkey ) Topic is solved
Replies: 16
Views: 2613

Re: Need Help (Error :Duplicate Hotkey ) Topic is solved

Well maybe I misunderstood what you were trying to do ... try this : If not, give us more detail on the exact behavior you're trying to achieve. ;45 & 60 Degree ':: $l:: If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400) doubleTap() else singleTap() return ;45 Degree ( Single Tap ) s...
by 4GForce
01 Feb 2017, 00:46
Forum: Ask For Help
Topic: Remapping Function keys exclusively ?
Replies: 6
Views: 1611

Re: Remapping Function keys exclusively ?

Like he said, or you might want to try by keycode ^{sc02E}

Code: Select all

F1::^c
F2::^v
F3::selectAllAndCopy()

Esc::ExitApp
Return
ExitApp
 
selectAllAndCopy() {
	send ^{a}
	send ^{sc02E}  ; same as ^c
}
by 4GForce
01 Feb 2017, 00:17
Forum: Ask For Help
Topic: Colour detection issue
Replies: 3
Views: 688

Re: Colour detection issue

Or leave it at fast and search for 0x0000FF instead.
RGB is soooooooooooo slow.
by 4GForce
01 Feb 2017, 00:04
Forum: Ask For Help
Topic: CoordMode issue
Replies: 7
Views: 1658

Re: CoordMode issue

You answered yourself in your question .... one is using windowed mode and the other is using screen.
by 4GForce
31 Jan 2017, 23:53
Forum: Ask For Help
Topic: Need Help (Error :Duplicate Hotkey ) Topic is solved
Replies: 16
Views: 2613

Re: Need Help (Error :Duplicate Hotkey ) Topic is solved

Well this takes cares of the duplicate hotkey and the tooltip works for me. $l:: If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400) Send ' else singleTap() return ;45 Degree ( Single Tap ) singleTap(){ send l ToolTipFont("s50", "Tahoma") ToolTip 45 degree SetTimer, RemoveToolTip, 500...
by 4GForce
31 Jan 2017, 23:00
Forum: Ask For Help
Topic: Need Help (Error :Duplicate Hotkey ) Topic is solved
Replies: 16
Views: 2613

Re: Need Help (Error :Duplicate Hotkey ) Topic is solved

Try something like this : Global isSingleTap := True F2::toggle() l::l_keyPressed() Return ExitApp toggle() { ; you could display the tooltip here when you toggle isSingleTap := !isSingleTap } l_keyPressed(){ if (isSingleTap) { doSingleTapStuff() } else { doDoubleTapStuff() } } doSingleTapStuff() { ...
by 4GForce
31 Jan 2017, 22:18
Forum: Gaming
Topic: Loop won't stop on key release Topic is solved
Replies: 20
Views: 3244

Re: Loop won't stop on key release Topic is solved

I have no clue how that code ever worked since you're calling mouse_event(MOUSEEVENTF_LEFTDOWN, x, y) ... https://msdn.microsoft.com/en-us/library/ms646260 Might not be exactly what you're looking for but take it as a starting point : ( Note that you have to hold left click then right to start scrol...

Go to advanced search