Search found 3797 matches

by Rohwedder
Yesterday, 10:16
Forum: Ask For Help
Topic: How to interrupt/restart a script before sleep is finished?
Replies: 8
Views: 137

Re: How to interrupt/restart a script before sleep is finished?

Then,
perhaps?:

Code: Select all

#MaxThreadsPerHotkey 2
F12::
Send,% (run:=["ab","b","b","b","b"]).RemoveAt(1)
If !Count
	While, Count:=run.Count(){
		Sleep, 1000
		Send,% run.RemoveAt(1)
	}
Return
by Rohwedder
Yesterday, 08:19
Forum: Ask For Help
Topic: How to interrupt/restart a script before sleep is finished?
Replies: 8
Views: 137

Re: How to interrupt/restart a script before sleep is finished?

Hallo,
try:

Code: Select all

#MaxThreadsPerHotkey 2
F12::
run := ["ab", "b", "b", "b", "b"]
If !Count
	While, Count:=run.Count() {
		Send % run.RemoveAt(1)
		Sleep, 1000
	}
Return
by Rohwedder
Yesterday, 03:28
Forum: Ask For Help
Topic: How can I make script work only on a specific keyboard layout?
Replies: 4
Views: 80

Re: How can I make script work only on a specific keyboard layout?

How about a Timer that checks e.g. once per second which language is active in the active window and changes the variable "Keyboard" accordingly?
by Rohwedder
Yesterday, 02:20
Forum: Ask For Help
Topic: Detecting scroll position of listview Topic is solved
Replies: 9
Views: 178

Re: Detecting scroll position of listview Topic is solved

Hallo, perhaps: gui,add,listview,vgLV w500 h500 x50 y50,ROWNUM|CONTENT loop 50 { lv_Add("",A_Index,"TEST " . A_Index) } gui show ,w600h600 f8:: ;hover over 15th element ControlGetPos ,cx, cy,,, SysListView321, A ControlGetFocus, Control, A ControlGet, Hwnd, Hwnd,, %Control%, A ScrollPos := DllCall("...
by Rohwedder
19 Jan 2021, 06:11
Forum: Ask For Help
Topic: Does not work CapsLock Up
Replies: 5
Views: 69

Re: Does not work CapsLock Up

My second script worked here.
Probably the behavior depends on the set behavior of Capslock.
by Rohwedder
19 Jan 2021, 05:40
Forum: Gaming
Topic: a script where the 'space' key is pressed infinitely and activated/deactivated with 'z'
Replies: 3
Views: 62

Re: a script where the 'space' key is pressed infinitely and activated/deactivated with 'z'

Hallo,
the same with two lines:

Code: Select all

z::SetTimer, z Up,% (go:=!go)?20:"Off"
z Up::Send,% go?A_Space:
by Rohwedder
19 Jan 2021, 04:37
Forum: Ask For Help
Topic: How can I make script work only on a specific keyboard layout?
Replies: 4
Views: 80

Re: How can I make script work only on a specific keyboard layout?

Hallo, try: q:: ControlGetFocus, Focused, A ControlGet, CtrlID, Hwnd,,% Focused, A ThreadID := DllCall("GetWindowThreadProcessId", "Ptr", CtrlID, "Ptr", 0) InputLocaleID := Format("0x{:X}", DllCall("GetKeyboardLayout", "UInt", ThreadID, "Ptr")) MsgBox,% InputLocaleID ;german: 0x4070407 ;english: 0x4...
by Rohwedder
19 Jan 2021, 04:19
Forum: Ask For Help
Topic: Does not work CapsLock Up
Replies: 5
Views: 69

Re: Does not work CapsLock Up

i had already thought of something like this, therefore an additional edit.
by Rohwedder
19 Jan 2021, 03:58
Forum: Ask For Help
Topic: Does not work CapsLock Up
Replies: 5
Views: 69

Re: Does not work CapsLock Up

Hallo, either a workaround: ~CapsLock:: KeyWait, CapsLock ToolTip, CapsLock Up %A_TickCount% Return ~CapsLock & f1:: ToolTip % A_ThisHotkey " " A_TickCount or: ;MsgBox,% Format("SC{:X}", GetKeySC("CapsLock")) ;here SC3A ~SC3A Up::ToolTip, CapsLock Up %A_TickCount% ~CapsLock & f1:: ToolTip % A_ThisHo...
by Rohwedder
18 Jan 2021, 13:33
Forum: Scripts and Functions
Topic: Numeral System Conversion of really arbitrary integers
Replies: 0
Views: 66

Numeral System Conversion of really arbitrary integers

Hallo, try: N = 31415926 ; Decimal Integer Number to test Dec = 0123456789 ; the Decimal Numerals Hex = 0123456789ABCDEF ; the Hexadecimal Numerals Comic = Oh @#&*$! ; a Comic Numeral system ; no repeating characters! MsgBox,% "Dec2Comic : " N := NuSyCo(N,Dec,Comic) MsgBox,% "Comic2Hex : " N := NuSy...
by Rohwedder
18 Jan 2021, 08:23
Forum: Ask For Help
Topic: permutations function with ALL possible combinations
Replies: 9
Views: 167

Re: permutations function with ALL possible combinations

Sorry, but now it smells like password cracking.
by Rohwedder
18 Jan 2021, 06:15
Forum: Ask For Help
Topic: permutations function with ALL possible combinations
Replies: 9
Views: 167

Re: permutations function with ALL possible combinations

Then,
try:

Code: Select all

String := "ABCD"
Len := StrLen(String)
q::
Loop,% Len**Len
{
	n := A_Index-1
	Loop,% Len
	{
		z := Mod(n, Len)
		Out := SubStr(String, z+1, 1) Out
		n := (n-z)//Len
	}
	SendInput,% Out "`n"
	Out =
}
by Rohwedder
18 Jan 2021, 04:48
Forum: Ask For Help
Topic: permutations function with ALL possible combinations
Replies: 9
Views: 167

Re: permutations function with ALL possible combinations

Hallo,
try:

Code: Select all

String := "ABCD"
q::
Loop, Parse, String
{
	Out1 := A_LoopField
	Loop, Parse, String
	{
		Out2 := Out1 A_LoopField
		Loop, Parse, String
		{
			Out3 := Out2 A_LoopField
			Loop, Parse, String
			{
				Out4 := Out3 A_LoopField
				SendInput,% Out4 "`n"
			}
		}
	}
}
by Rohwedder
18 Jan 2021, 02:33
Forum: Gaming
Topic: Fullscreen Splash-GUI Fading Topic is solved
Replies: 2
Views: 63

Re: Fullscreen Splash-GUI Fading Topic is solved

Hallo, try: global AW_BLEND := 0x00080000 global AW_HIDE := 0x00010000 Gui,Color,Black,000000 Gui +LastFound Gui, +hwndhMyGUI Gui, -Caption +AlwaysOnTop Gui, Add, Button, xm+20 ym+50 w150 h50 gFade, Fade Out/In TempVar := A_ScreenHeight +100 Gui,Show, h%TempVar% w%A_ScreenWidth% Gui, Hide DllCall("u...
by Rohwedder
17 Jan 2021, 11:25
Forum: Ask For Help
Topic: Repeat specific part of script Topic is solved
Replies: 2
Views: 77

Re: Repeat specific part of script Topic is solved

Hallo,
try:

Code: Select all

$F8::
IF F8
	Goto, SecondPart 
FirstPart:
Send, {3}
Sleep, 250
SecondPart:
Send, {e up}
endtime := A_TickCount + 1500
While ((F8:=GetKeyState("F8","P")) && A_TickCount < endtime)
{
	Send, {e down}
	Sleep, 200
}
return
by Rohwedder
17 Jan 2021, 05:28
Forum: Ask For Help
Topic: Multiple letter hotkey
Replies: 4
Views: 94

Re: Multiple letter hotkey

Hallo, perhaps: ^+1:: ^+2:: ^+3:: ^+4:: ^+5:: ^+6:: ^+7:: ^+8:: ^+9:: #IF HotNo ^+0:: ;prevents leading zeros HotNo .= SubStr(A_ThisHotkey,0) Return ~*Ctrl Up:: KeyWait, Shift MsgBox, 64, Result, You typed:`n`n%HotNo% HotNo = Return #IF Edit: ~*Ctrl Up:: KeyWait, Shift instead of ~Ctrl Up:: No trigg...
by Rohwedder
16 Jan 2021, 05:41
Forum: Ask For Help
Topic: calculate 2+3=
Replies: 3
Views: 105

Re: calculate 2+3=

Hallo,
try:

Code: Select all

q::
ClipBoard = 2+3
FileDelete, ~.ahk
FileAppend, ClipBoard := %ClipBoard%, ~.ahk, UTF-8
RunWait, ~.ahk
MsgBox,% ClipBoard ;5
Return
Or use tidbit's eval(exp)
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=15389

Go to advanced search