Search found 2242 matches

by wolf_II
Today, 19:13
Forum: Ask For Help
Topic: kybd macro script is not removing occurrence of the carets
Replies: 5
Views: 55

Re: kybd macro script is not removing occurrence of the carets

Try RTrim() : !=:: ; hotkey Alt + "=" clipboard:= sendinput, ^a^c ClipWait msgbox, 1%clipboard% in_put:="^" out_put:="" clipboard:=strreplace(clipboard, in_put, out_put) Clipboard := RTrim(Clipboard, "`r`n") ; <-- here msgbox, 2%clipboard% sendinput, %clipboard% return Untested.
by wolf_II
Today, 15:28
Forum: Forum Issues
Topic: AHK custom google search
Replies: 3
Views: 55

Re: AHK custom google search

I had today also some trouble with loogging in. After I changed my link to incorporate "www", all issues settled.
There was a post with a hint. https://www.autohotkey.com/boards/viewt ... 96#p252596.
Maybe that would apply :?:
by wolf_II
Today, 12:43
Forum: Ask For Help
Topic: Help using a Ternary Operator to Format Time
Replies: 6
Views: 53

Re: Help using a Ternary Operator to Format Time

Thanks for the flowers. :D The ternary operator can start several commands, but has only two options. But we can nest them: #SingleInstance, force value := 2 FormatTime result, % (value = 1) ? A_Now : (value = 2) ? A_YYYY A_MM (A_DD - 1) : "not the correct value" , MM/dd/yyyy ; keep the last paramet...
by wolf_II
Today, 12:02
Forum: Ask For Help
Topic: Help using a Ternary Operator to Format Time
Replies: 6
Views: 53

Re: Help using a Ternary Operator to Format Time

Try this:

Code: Select all

#SingleInstance, force
value := 1
FormatTime result, % (value = 1) ? A_Now : "not the correct value", MM/dd/yyyy
msgbox %result%
return
I hope that helps.
by wolf_II
Today, 11:53
Forum: Ask For Help
Topic: kybd macro script is not removing occurrence of the carets
Replies: 5
Views: 55

Re: kybd macro script is not removing occurrence of the carets

Try this: (with ClipWait and a syntax correction) !=:: ; hotkey Alt + "=" clipboard:= sendinput, ^a^c ClipWait msgbox, 1%clipboard% in_put:="^" out_put:="" clipboard:=strreplace(clipboard, in_put, out_put) msgbox, 2%clipboard% sendinput, %clipboard% return I hope that helps.
by wolf_II
Today, 11:09
Forum: Ask For Help
Topic: Sending A Variable that contains variables or expressions
Replies: 10
Views: 204

Re: Sending A Variable that contains variables or expressions

Just keep on parsing: #NoEnv #SingleInstance Force CoordMode, Mouse, Screen x := 20, y := 30 Gui, Add, Edit, xm w300 vTxt1, {Click `%x`%, `%y`%, 0} Gui, Add, Button, x+m, Send1 Gui, Add, Edit, xm w300 vTxt2, {Click, x + 70 , y + 10 , 0} Gui, Add, Button, x+m, Send2 Gui, Add, Edit, xm w300 vTxt3, "{C...
by wolf_II
Today, 10:49
Forum: Ask For Help
Topic: Automatically Stop / Pauze a script after software crashes.
Replies: 1
Views: 19

Re: Automatically Stop / Pauze a script after software crashes.

This sound to me, as if you are using a script which sends keystrokes/mouseclicks into the "wild".
Use a different script, or post your script, and someone can at least have a look.
by wolf_II
Today, 09:55
Forum: Ask For Help
Topic: Selecting/Prioritizing a GUI button
Replies: 3
Views: 75

Re: Selecting/Prioritizing a GUI button

Change first line to make OK-button respond to {Enter}:

Code: Select all

Gui, Add, Button, x40 y60 w80 h30 Default, OK
I hope that helps.
by wolf_II
Today, 08:50
Forum: Ask For Help
Topic: Sending A Variable that contains variables or expressions
Replies: 10
Views: 204

Re: Sending A Variable that contains variables or expressions

Try this: #NoEnv #SingleInstance Force CoordMode, Mouse, Screen x := 20, y := 30 Gui, Add, Edit, w300 vTxt, {Click, x + 700 , y + 10 , 0} Gui, Add, Button,, Send Gui, Show return ; end of auto-execute section F5:: Reload GuiClose: ExitApp ButtonSend: Gui, Submit, NoHide parsedTxt := parseTxt(Txt) Ms...
by wolf_II
Today, 07:54
Forum: Ask For Help
Topic: Sending A Variable that contains variables or expressions
Replies: 10
Views: 204

Re: Sending A Variable that contains variables or expressions

Maybe like this: #NoEnv #SingleInstance Force x := 20, y := 30 Gui, Add, Edit, w300 vTxt, {Click, x + 700 , y + 10 , 0} Gui, Add, Button,, Send Gui, Show return ; end of auto-execute section GuiClose: ExitApp ButtonSend: Gui, Submit, NoHide MsgBox, % parseTxt(Txt) return ;---------------------------...
by wolf_II
Today, 07:37
Forum: Ask For Help
Topic: Sending A Variable that contains variables or expressions
Replies: 10
Views: 204

Re: Sending A Variable that contains variables or expressions

Try with parsing :?: #NoEnv #SingleInstance Force x := 20, y := 30 Gui, Add, Edit, w300 vTxt, {Click `%x`%, `%y`%, 0} Gui, Add, Button,, Send Gui, Show return ; end of auto-execute section GuiClose: ExitApp ButtonSend: Gui, Submit, NoHide Txt := parseTxt(Txt) MsgBox, % Txt return ;------------------...
by wolf_II
Today, 03:56
Forum: Ask For Help
Topic: Using variables with Send {Click} Topic is solved
Replies: 6
Views: 49

Re: Using variables with Send {Click} Topic is solved

Try this:

Code: Select all

x := 0, y := 0

Loop 10 {
    Send, {click, %x%, %y%}
    x++, y++
}

Esc:: ExitApp
I hope that helps.

Edit too late
by wolf_II
Today, 03:31
Forum: Ask For Help
Topic: Using variables with Send {Click} Topic is solved
Replies: 6
Views: 49

Re: Using variables with Send {Click} Topic is solved

Try this:

Code: Select all

x := 0, y := 0

Loop
    MouseMove, ++X, ++Y

Esc:: ExitApp
I hope that helps.
by wolf_II
Yesterday, 12:24
Forum: Ask For Help
Topic: Help! Clicking Save Button for Specific Dialog
Replies: 5
Views: 48

Re: Help! Clicking Save Button for Specific Dialog

Try this:

Code: Select all

Loop {
    WinWait, Save As ahk_class #32770 ahk_exe cpwsave.exe
    ControlClick, Button2
    WinActivate, ahk_exe Revit.exe
}
return
I hope that helps.
by wolf_II
Yesterday, 11:36
Forum: Ask For Help
Topic: Help! Clicking Save Button for Specific Dialog
Replies: 5
Views: 48

Re: Help! Clicking Save Button for Specific Dialog

Try this:

Code: Select all

#NoEnv
#SingleInstance, Force
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 1

Loop {
    WinWait, Save As ahk_class #32770 ahk_exe cpwsave.exe
    ControlClick, Button2
}
return
I hope that helps.
by wolf_II
Yesterday, 10:56
Forum: Ask For Help
Topic: How to use InStr inside SubStr? Topic is solved
Replies: 2
Views: 38

Re: How to use InStr inside SubStr? Topic is solved

Try this:

Code: Select all

pos := InStr(Clipboard, " ", false, 1, 2) ; result is stored in pos
Send %	SubStr(Clipboard, 1, pos)
I hope that helps.

maybe even pos-1 would be better
by wolf_II
Yesterday, 06:56
Forum: Gaming
Topic: Place "tick" in check-box via AHK Topic is solved
Replies: 2
Views: 35

Re: Place "tick" in check-box via AHK Topic is solved

There are other methods also, but you are looking for a key to send:
Try a sending a blank (" ", or %A_Space%). Test with hitting the spacebar.

A possible alternative is the GuiControl command.
by wolf_II
08 Dec 2018, 05:39
Forum: Ask For Help
Topic: Simplify uptime display code using RegEx
Replies: 8
Views: 148

Re: Simplify uptime display code using RegEx

For some reason this code still displays "0 seconds" in the ToolTip/MsgBox. All other zeros are removed properly. Can't figure why. b/c you will never find "0 seconds %A_Space%", so it never gets replaced You could search for what is actually in the string, and replace that then instead, like so (n...
by wolf_II
07 Dec 2018, 13:06
Forum: Ask For Help
Topic: Can't seem to make this Drop Down List behave correctly
Replies: 2
Views: 62

Re: Can't seem to make this Drop Down List behave correctly

Reset the list before adding inside the loop, like this:

Code: Select all

GetMyList:
List := "" ; <-- here
if (Name = "")
I hope that helps.
by wolf_II
07 Dec 2018, 11:00
Forum: Ask For Help
Topic: How to convert a range of data into an array in MS Excel?
Replies: 10
Views: 113

Re: How to convert a range of data into an array in MS Excel?

Try ActiveSheet like this:

Code: Select all

F1::
    XL := ComObjActive("excel.application")
    Result := []
    for Cell in XL.ActiveSheet.Range("A1:A10")
        Result.Push(Cell.Value)
return
I hope that helps.

Go to advanced search