Search found 3881 matches

by boiler
Today, 16:42
Forum: Ask For Help
Topic: Merge groups of text files randomly preserving order
Replies: 3
Views: 118

Re: Merge groups of text files randomly preserving order

You didn't apparently didn't actually run the script as I presented it more than once because it would have cleared out the variables each time you ran it and showed the correct output each time. It looks like you added a hotkey to keep executing the same code, in which case you would have to clear ...
by boiler
Today, 15:39
Forum: Ask For Help
Topic: GuiControl - Change color and size Topic is solved
Replies: 3
Views: 43

Re: GuiControl - Change color and size Topic is solved

You have an extra comma in your GuiControl Font line. Should be:

Code: Select all

GuiControl 2:Font, Result2
by boiler
Today, 12:25
Forum: Ask For Help
Topic: How to extract texts displayed in MsgBox without the markers?
Replies: 3
Views: 87

Re: How to extract texts displayed in MsgBox without the markers?

Have this script running, and it will automatically clean up the Clipboard when you copy that format from a MsgBox. #Persistent OnClipboardChange("CleanMsgBox") return CleanMsgBox() { if WinActive("ahk_class #32770") Clipboard := RegExReplace(Clipboard, "s)\v*---------------------------.*?----------...
by boiler
Today, 11:45
Forum: Ask For Help
Topic: script locking mouse
Replies: 2
Views: 74

Re: script locking mouse

Try it like this. The $ keeps it from calling itself (not triggered by virtual clicks), and the * allows for modifier keys like Ctrl to be held down. Also showed how “until” can be used instead of if/break. Should end your hotkey routines with a return, btw. f9::Suspend $*LButton:: Loop { SetMouseDe...
by boiler
Today, 08:59
Forum: Ask For Help
Topic: Selenium: configure install path
Replies: 6
Views: 117

Re: Selenium: configure install path

BNOLI wrote: :crazy: :x :sick: :thumbdown:
Since you are a new member of the forum, perhaps you weren’t a regular visitor when it was the target of ongoing crippling attacks that the security measures help to prevent. If you were, you might have quite a different reaction to them.
by boiler
Today, 08:50
Forum: Ask For Help
Topic: alternative way to trigger SaveAs dialog Topic is solved
Replies: 5
Views: 175

Re: alternative way to trigger SaveAs dialog Topic is solved

ControlClick doesn’t activate a window, but this should do it: loop { WinActivate,ahk_id %ID% WinActivate,ahk_id %ID% Send, ^+s Sleep, 500 } until WinActive("Save As ahk_class #32770") As long as the correct window is active when you press the hotkey (so that it grabs the correct ID), it seems it sh...
by boiler
Yesterday, 20:45
Forum: Ask For Help
Topic: Merge groups of text files randomly preserving order
Replies: 3
Views: 118

Re: Merge groups of text files randomly preserving order

This generates the two matched shuffled lists, which I understand to be file names, so then you can read the text in from the files per the defined order of file names. Text1 = ( T1 House T1 Vehicle T1 Ball T1 Pencil ) Text2 = ( T2 Red T2 Car T2 Big T2 Blunt ) Text3 = ( T3 Tree T3 Cloth T3 Table T3 ...
by boiler
Yesterday, 16:59
Forum: Ask For Help
Topic: SoundBeep after Loop, break
Replies: 2
Views: 96

Re: SoundBeep after Loop, break

The only command you have executing on the condition that it was double-clicked is the clipboard := "" line. So your script is executing everything below it (the loop) every time you release LAlt whether it was double tapped or not. You need to use { } to designate a code block after the If statemen...
by boiler
Yesterday, 12:33
Forum: Ask For Help
Topic: Make the GUI button disabled / grayed Topic is solved
Replies: 13
Views: 286

Re: Make the GUI button disabled / grayed Topic is solved

You can’t do the following from your first example because only the last directive before the hotkey would take effect:

Code: Select all

#If WinActive( "ahk_id " GuiHwnd )
#If ( !Flag )
But you could do this:

Code: Select all

 #If WinActive( "ahk_id " GuiHwnd ) && ( !Flag )
by boiler
Yesterday, 11:58
Forum: Ask For Help
Topic: Newbie - capturing actions to automate Topic is solved
Replies: 6
Views: 252

Re: Newbie - capturing actions to automate Topic is solved

Like in the attached screenshot, not sure how I would determine how to go trough each entry (They all have the same icon to the right of the line) You would keep track of the y value of the last found image, and next time through the loop, you start the search a little lower so it finds the next on...
by boiler
Yesterday, 10:55
Forum: Ask For Help
Topic: Else command does not work properly in if expression
Replies: 2
Views: 89

Re: Else command does not work properly in if expression

You don’t use % symbols around a variable in an expression (except in special circumstances). So lines like this:

Code: Select all

 if (%colorrr% = juoda)
should be:

Code: Select all

if (colorrr = juoda)
by boiler
Yesterday, 08:23
Forum: Ask For Help
Topic: Split string only if left part contains an element of z
Replies: 4
Views: 134

Re: Split string only if left part contains an element of z

Your version only works if it matches the last item in z. You need to break the loop after it finds it to avoid that. Also, everything you have with varA being True and False is just adding lines to do what if already does anyway. Take that stuff out and just make it like this: strExample1 := "Split...
by boiler
Yesterday, 08:04
Forum: Ask For Help
Topic: Make the GUI button disabled / grayed Topic is solved
Replies: 13
Views: 286

Re: Make the GUI button disabled / grayed Topic is solved

1) What is the difference between ~Enter:: and Enter:: ? Per the documentation on ~ in hotkey modifier symbols , "When the hotkey fires, its key's native function will not be blocked (hidden from the system)." So pressing Enter will have its usual effect in addition to what the hotkey routine does,...
by boiler
04 Apr 2020, 22:14
Forum: Ask For Help
Topic: My script works – no idea why: ImageSearch Errorlevels
Replies: 10
Views: 292

Re: My script works – no idea why: ImageSearch Errorlevels

I see there was a space between the : and the =. Please remove it. I edited my earlier post.
by boiler
04 Apr 2020, 16:47
Forum: Ask For Help
Topic: regexmatch help Topic is solved
Replies: 3
Views: 121

Re: regexmatch help Topic is solved

Code: Select all

text := "apple8"
RegExMatch(text, "\D+", var)
MsgBox, % var
by boiler
04 Apr 2020, 14:12
Forum: Ask For Help
Topic: passing an array into a function? Topic is solved
Replies: 2
Views: 108

Re: passing an array into a function? Topic is solved

See below. Note that I changed the name of the array in the function thisarray to make it clear that it's not really using the same name as the array you passed to it (although you could name it the same). It is passing a reference to the same array object. If you want the function to have its own c...
by boiler
04 Apr 2020, 10:04
Forum: Ask For Help
Topic: My script works – no idea why: ImageSearch Errorlevels
Replies: 10
Views: 292

Re: My script works – no idea why: ImageSearch Errorlevels

Found1 := FindClick("autohotkey_travel", "Sleep50 oTransBlack,40 n2") if !Found1 Found2 := FindClick("autohotkey_travel_light", "Sleep50 oTransBlack,40 n2") if (Found1 || Found2) ToolTip, Success! else ToolTip, Image could not be found on the screen. return You can put any command(s) in place of th...
by boiler
04 Apr 2020, 08:05
Forum: Ask For Help
Topic: Make the GUI button disabled / grayed Topic is solved
Replies: 13
Views: 286

Re: Make the GUI button disabled / grayed Topic is solved

Activating the button is no problem. GuiControl 1: Enable, ButtOK But to focus on the button I got stuck. GuiControl 1: Focus, ButtOK (nothing happens) It actually does get focus. Notice that the caret no longer appears in the edit box. It just doesn’t visually indicate that it has focus until you ...
by boiler
04 Apr 2020, 03:33
Forum: Ask For Help
Topic: How do I add a picture to a button I'm too inexperienced Topic is solved
Replies: 2
Views: 110

Re: How do I add a picture to a button I'm too inexperienced Topic is solved

The easiest way is just to add a picture instead of a button, and because it still has the gCancel option, it will still go to the Cancel label when you click the picture. Gui, Add, Picture, x0 y0 w2560 h1440 gCancel, C:\MyPath\MyPic.jpg Gui, +AlwaysOnTop -Caption +Border Gui, Color, Black AppsKey::...
by boiler
04 Apr 2020, 03:11
Forum: Ask For Help
Topic: Snapshot/History State in Notepad++ ?
Replies: 28
Views: 548

Re: Snapshot/History State in Notepad++ ?

The Scintilla API would be best, but you can also instantly jump to the line number you want like this: Send, ^g WinWaitActive, Go To... ahk_class #32770,, 1 if !ErrorLevel Send, % Match1 "{Enter}" Here it is implemented in your script: #IfWinActive, ahk_class Notepad++ ^k:: ; take snapshot ;get the...

Go to advanced search