Search found 1098 matches

by swagfag
Today, 16:34
Forum: Ask For Help
Topic: Help with, "and if not in . . ." proper syntax?
Replies: 2
Views: 33

Re: Help with, "and if not in . . ." proper syntax?

Code: [Select all]GeSHi © Codebox Plus

square := "0xFFFFFF"
circle := "0x000000"

Pixelgetcolor, RED, 10, 10
Pixelgetcolor, BLUE, 200, 200

if (RED = square && BLUE != circle)
ControlSend,, X, Notepad
by swagfag
Today, 16:30
Forum: Ask For Help
Topic: Use Continue in Repeated Code
Replies: 2
Views: 35

Re: Use Continue in Repeated Code

post code
by swagfag
Today, 11:26
Forum: Ask For Help
Topic: Trigger action by tapping different keys in rapid succession
Replies: 6
Views: 72

Re: Trigger action by tapping different keys in rapid succession

thats because #If directives overwrite each other try this instead: ; these directives need to exist somewhere in the script for Hotkey, If, CustomExpression to work #If waitForNextKey && WinActive("ahk_exe MonsterHunterWorld.exe") #If Keymap := [["{F1}1", "{F1}2&quo...
by swagfag
Today, 09:21
Forum: Scripts and Functions
Topic: VLC and Blender Script
Replies: 1
Views: 36

Re: VLC and Blender Script

different way, not necessarily better per se, but different: #NoEnv #SingleInstance force SendMode Input SetWorkingDir %A_ScriptDir% fn := Func("mySendFunc") for key, modifier in {"left": "+", "right": "+", "space": ""} { bf := fn...
by swagfag
Today, 07:05
Forum: Ask For Help
Topic: Increase script sleep times reliability
Replies: 2
Views: 55

Re: Increase script sleep times reliability

try DllCall("Sleep", "UInt", 100)

but know the timings wont ever be 100% accurate, in any case
by swagfag
Today, 04:47
Forum: Ask For Help
Topic: Trigger action by tapping different keys in rapid succession
Replies: 6
Views: 72

Re: Trigger action by tapping different keys in rapid succession

different solution: 1:: ToolTip Press next key now!, A_ScreenWidth/2, A_ScreenHeight/2 SetTimer TriggerTimeout, -200 waitingForNextKey := true return TriggerTimeout: ToolTip waitingForNextKey := false return #If waitingForNextKey 1:: MsgBox 11 waitingForNextKey := false return 2:: MsgBox 12 waitingF...
by swagfag
Today, 03:12
Forum: Ask For Help
Topic: Enter a series of dates using a looped script
Replies: 2
Views: 36

Re: Enter a series of dates using a looped script

Code: [Select all]GeSHi © Codebox Plus

base := "2018-01-05"
base_yyyymmdd := StrReplace(base, "-")

Loop
{
base_yyyymmdd += 7, Days
FormatTime next, % base_yyyymmdd, yyyy-MM-dd
MsgBox % next
}

Esc::ExitApp
by swagfag
Yesterday, 11:32
Forum: Ask For Help
Topic: Error in a simple script
Replies: 4
Views: 52

Re: Error in a simple script

is there something wrong?
by swagfag
Yesterday, 07:24
Forum: Ask For Help
Topic: pixelsearch help
Replies: 4
Views: 54

Re: pixelsearch help

about the easiest way you could accomplish that is as follows: • take a screenshot of ur entire screen • load it up in ps/ur favorite img editor • create a black background layer • apply a black layer mask to the screenshot • paint in with white on the layer mask the pixels/crazy shapes u wanna look...
by swagfag
21 Sep 2018, 09:10
Forum: Ask For Help
Topic: Start loop again with a key press
Replies: 16
Views: 198

Re: Start loop again with a key press

Code: [Select all] [Expand]GeSHi © Codebox Plus

by swagfag
21 Sep 2018, 08:47
Forum: Ask For Help
Topic: XButton1 and XButton2 remap not working
Replies: 2
Views: 37

Re: XButton1 and XButton2 remap not working

Code: [Select all]GeSHi © Codebox Plus

XButton1::Send {Blind}{Shift Down}
XButton1 Up::Send {Blind}{Shift Up}
XButton2::Send {Blind}{Ctrl Down}
XButton2 Up::Send {Blind}{Ctrl Up}

try this instead. run as admin, turn off mouse software, maybe try these directives:
by swagfag
21 Sep 2018, 08:36
Forum: Ask For Help
Topic: Checking to see if a Window is no longer at the front
Replies: 1
Views: 20

Re: Checking to see if a Window is no longer at the front

msg := DllCall("RegisterWindowMessageW", "Str", "SHELLHOOK", "UInt") DllCall("RegisterShellHookWindow", "Ptr", A_ScriptHwnd) OnMessage(msg, "WM_SHELLHOOKMESSAGE") OnExit("Deregister") Esc::ExitApp q:: hTarget := WinActi...
by swagfag
21 Sep 2018, 07:17
Forum: Ask For Help
Topic: Reversing lines in a text variable Topic is solved
Replies: 4
Views: 64

Re: Reversing lines in a text variable Topic is solved

Code: [Select all] [Expand]GeSHi © Codebox Plus

by swagfag
21 Sep 2018, 02:53
Forum: Ask For Help
Topic: using functions overwrites the default hotkey Topic is solved
Replies: 2
Views: 27

Re: using functions overwrites the default hotkey Topic is solved

it does exactly what u told it to do - return, ie nothing. use a directive

Code: [Select all] [Expand]GeSHi © Codebox Plus

by swagfag
21 Sep 2018, 02:44
Forum: Ask For Help
Topic: Holding variable state between same hotkey occurrences
Replies: 1
Views: 19

Re: Holding variable state between same hotkey occurrences

F4:: if (vMyVar == "") vMyVar := A_TickCount KeyWait, F4, D ; do stuff and calculations with vMyVar MsgBox Value of %vMyVar% ; Next time F4 is invoked, how to make it so vMyVar isn't reinitalized with A_TickCount take care with block comments https://autohotkey.com/docs/Language.htm#comme...
by swagfag
20 Sep 2018, 03:44
Forum: Ask For Help
Topic: Static variables for GUI control associated variables?
Replies: 21
Views: 264

Re: Static variables for GUI control associated variables?

I have a couple of questions about GuiClose: 1) Can this label be jumped to from outside the class? Does it need to be unique? e.g. <gui_name>GuiClose (in cases where more than one GUI exists) 2) The more important question: Is there any way I can use a function/method instead of a label? i was act...
by swagfag
19 Sep 2018, 12:14
Forum: Ask For Help
Topic: find #Include line by regex
Replies: 4
Views: 113

Re: find #Include line by regex

1. O)^\s*#Incl\s+(\*i )?(?P<Path> .* )(\s+;(?P<Comment>.*)) ? - .* in path has matched everything until the end of line already, comment is marked optional and there arent any more tokens for it to match, so it fails 2. O)^\s*#Incl\s+(\*i )?(?P<Pat...
by swagfag
19 Sep 2018, 08:00
Forum: Ask For Help
Topic: Extracting numbers from string Topic is solved
Replies: 6
Views: 167

Re: Extracting numbers from string Topic is solved

yes, it should be just static i := 1 i dont understand how the incorrect version is parsed, though: local static i := 1 local static declares a blank local variable called 'static' so what is i then? its not global, since it doesnt leak. its not pure local, since it gets incremented between function...
by swagfag
19 Sep 2018, 06:19
Forum: Ask For Help
Topic: Static variables for GUI control associated variables?
Replies: 21
Views: 264

Re: Static variables for GUI control associated variables?

#NoEnv #SingleInstance Force main := new MainGui() main.show() aux := new AuxGui() aux.show() Esc::ExitApp class BaseGui { __New(title) { Gui, New, +AlwaysOnTop +HwndhGui, % title this.hGui := hGui Gui, Font, s16 Gui, Add, Edit, x10 y10 w200 +HwndhEdit, hello world this.hEdit := hEdit Gui, Add, But...

Go to advanced search