Search found 68 matches

by telanx
14 Jan 2020, 12:55
Forum: Ask for Help (v1)
Topic: timer to run only allowed to run at a certain time Topic is solved
Replies: 9
Views: 1327

Re: timer to run only allowed to run at a certain time Topic is solved

This should be what you want. :ugeek:

Code: Select all

if (A_Hour >= 0 and A_Hour <= 1) {
    if (A_Min >= 0 and A_Min <= 59)
        if (A_Sec >= 0 and A_Sec <= 59)
            msgbox CurrentTime:%A_Hour%:%A_Min%:%A_Sec%
            msgbox You want function code
} else {
    ExitApp
}
return
by telanx
14 Jan 2020, 12:10
Forum: Ask for Help (v1)
Topic: Working loop for background program
Replies: 2
Views: 224

Re: Working loop for background program

Background sending uses ControlSend
Minimizing the window may not work, so don't minimize it.
by telanx
14 Jan 2020, 11:52
Forum: Ask for Help (v1)
Topic: different .ahk files ?
Replies: 4
Views: 412

Re: different .ahk files ?

@gregster thanks, So that explains it. I usually use vim to edit scripts, but I know which encoding should be saved as.
by telanx
14 Jan 2020, 10:51
Forum: Ask for Help (v1)
Topic: Console App Help: Send ^Break or ^C
Replies: 1
Views: 228

Re: Console App Help: Send ^Break or ^C

Code: Select all

SetTitleMatchMode, 2
ControlSend,, ^C, cmd.exe
ControlSend,, exit{enter}, cmd.exe ;cmd.exe is window title, you can change it for another.
by telanx
14 Jan 2020, 09:58
Forum: Ask for Help (v1)
Topic: assembling two scripts in one with same functions
Replies: 9
Views: 1163

Re: assembling two scripts in one with same functions

You mean?

Code: Select all

~v::t:=true
~b::t:=false

#IF t
~LButton::click()
#IF

#IF !t
~Lbutton & ~RButton::autofire()
~Rbutton & ~LButton::autofire()
#IF
by telanx
14 Jan 2020, 09:31
Forum: Ask for Help (v1)
Topic: assembling two scripts in one with same functions
Replies: 9
Views: 1163

Re: assembling two scripts in one with same functions

Use this structure.

Code: Select all

test1() {
    msgbox test1
    return
}

test2() {
    msgbox test2
    return
}

; t default is flase, so it is '!t'
~v::t:=!t

#IF t
~RButton & ~LButton::test1()
#IF

#IF !t
~LButton::test2()
#IF
by telanx
14 Jan 2020, 05:05
Forum: Ask for Help (v1)
Topic: timer to run only allowed to run at a certain time Topic is solved
Replies: 9
Views: 1327

Re: timer to run only allowed to run at a certain time Topic is solved

You should use the Scheduler feature of windows, this will simplify the problem, you just need to focus on your working code instead of processing time.
by telanx
14 Jan 2020, 04:57
Forum: Ask for Help (v1)
Topic: different .ahk files ?
Replies: 4
Views: 412

Re: different .ahk files ?

The difference between these two files is that one has a BOM header and one does not. The BOM of UTF-8 is 3 bytes, so one is 8 bytes and the other is 5 bytes. ahk is prone to errors when processing unicode characters, It is recommended to use notepad.exe to save, or you know the format of your save ...
by telanx
14 Jan 2020, 04:40
Forum: Ask for Help (v1)
Topic: Alt-Tab
Replies: 2
Views: 281

Re: Alt-Tab

awesome, I also have this problem. @Rohwedder
by telanx
13 Jan 2020, 13:00
Forum: Ask for Help (v1)
Topic: hh Topic is solved
Replies: 2
Views: 429

Re: how can i change the function key of this script to right click, someone help me Topic is solved

Open a text editor, search for 'LButton', and replace it with 'RButton'. Done.
by telanx
13 Jan 2020, 11:24
Forum: Ask for Help (v1)
Topic: Sleep interferring on other hotkeys
Replies: 4
Views: 423

Re: Sleep interferring on other hotkeys

After testing, the sleep time does interfere with each other.

Music playback errors may be caused by similar file names.Try to rename.
by telanx
13 Jan 2020, 09:20
Forum: Ask for Help (v1)
Topic: Script question!
Replies: 6
Views: 610

Re: Script question!

Modified from @Hellbent's code ; This is required, otherwise the loop cannot be stopped. #MaxThreadsPerHotkey 2 RCtrl:: toggle := !toggle while toggle { while (A_Index <= 8) { if not Toggle break send {F%A_Index%} sleep 1000 ;send delay } } return
by telanx
13 Jan 2020, 04:48
Forum: Ask for Help (v1)
Topic: Targeting buttons
Replies: 4
Views: 580

Re: Targeting buttons

Use relative coordinate system, or use the built-in macro function.

Code: Select all

CoordMode Pixel, Window
SetTitleMatchMode 2
WinTitle:="part of Title text"
if WinExist(WinTitle) {
    WinActivate
    ImageSearch ...
    if found {
        key sequence
    } else {
        more ...
    }
}
by telanx
13 Jan 2020, 00:55
Forum: Ask for Help (v1)
Topic: Keys "broken" while running AHK with Hotkeys like Space and Tab
Replies: 4
Views: 495

Re: Keys "broken" while running AHK with Hotkeys like Space and Tab

@gregster
Both are correct. If use your method, it will only be sent when the key is popped up, only once. As you said, It depends on your goal.
by telanx
13 Jan 2020, 00:39
Forum: Ask for Help (v1)
Topic: Keys "broken" while running AHK with Hotkeys like Space and Tab
Replies: 4
Views: 495

Re: Keys "broken" while running AHK with Hotkeys like Space and Tab

will not block the original button:

Code: Select all

~Tab & 2::send test1
~Space & 4::send test2
by telanx
12 Jan 2020, 23:12
Forum: Ask for Help (v1)
Topic: Resulution Change in x an y mousemove Topic is solved
Replies: 6
Views: 770

Re: Resulution Change in x an y mousemove Topic is solved

Please look at the documentation, and most errors are difficult to detect, so use simplified code for testing.

Code: Select all

Resulution := "1920x1080"
if(Resulution = "1920x1080")
    msgbox %Resulution%
    return
by telanx
12 Jan 2020, 22:20
Forum: Ask for Help (v1)
Topic: How do I add an additional layer / pause to an existing toggle? Topic is solved
Replies: 12
Views: 1264

Re: How do I add an additional layer / pause to an existing toggle? Topic is solved

After testing it is correct, press F8 to send 'NumpadDiv' all the time, press and hold '`' to stop sending.
by telanx
12 Jan 2020, 22:09
Forum: Ask for Help (v1)
Topic: commands in a loop Topic is solved
Replies: 2
Views: 335

Re: commands in a loop Topic is solved

Add two control variables to control the loop process and execute it only once after each color change. changed := 1 sent := 0 Loop { sleep 1000 Pixelgetcolor, Color0, 812, 1176 if (Color0 = 0x00E900) { if (changed = 1) { Send, {F24 down} Sleep 100 Send, {F24 up} changed := 0 sent := 0 } } else { ch...
by telanx
12 Jan 2020, 06:45
Forum: Ask for Help (v1)
Topic: How do I add an additional layer / pause to an existing toggle? Topic is solved
Replies: 12
Views: 1264

Re: How do I add an additional layer / pause to an existing toggle? Topic is solved

@Rohwedder Good idea, but one letter is wrong. :lol:

Code: Select all

F8::
Toggle := !Toggle
If Toggle
	Send {NumpadDiv Down}
else
	Send {NumpadDiv Up}
return
#IF Toogle  ;<-- Toggle
`::Send {NumpadDiv Up}
` Up::Send {NumpadDiv Down}
#If

Go to advanced search