Search found 49 matches

by RubbeH
15 May 2023, 06:58
Forum: Ask for Help (v1)
Topic: Hotstrings() to call function Topic is solved
Replies: 11
Views: 801

Re: Hotstrings() to call function Topic is solved

#Requires AutoHotkey v1.1.33 #SingleInstance Force txtPath := A_ScriptDir "\strings.txt" If !FileExist(txtPath) MsgBox, 48, Error, % "File not found.`n`n" txtPath Loop Read, % txtPath If (arr := StrSplit(A_LoopReadLine, "=")).Length() = 2 Hotstring(":XCT*:" Trim(arr[1]), Func("paste").Bind(Trim(arr...
by RubbeH
05 May 2023, 07:33
Forum: Ask for Help (v1)
Topic: Hotstrings() to call function Topic is solved
Replies: 11
Views: 801

Re: Hotstrings() to call function Topic is solved

I wonder if there is a bug in AutoHotkey itself that prevents a function object from being used, but you can call a labeled subroutine or function. I eventually got a version of your code working, however - all hotstrings end up with the last "B"-part. meaning this: :*:aaa::abcdefg :*:ama::ask me a...
by RubbeH
05 May 2023, 03:49
Forum: Ask for Help (v1)
Topic: Hotstrings() to call function Topic is solved
Replies: 11
Views: 801

Hotstrings() to call function Topic is solved

Hi! running version 1.1.23.01. I got a script which loops through, parses and creates hotstrings from a .txt-file, however - I want to use the paste function (more reliable, especially if the hotstrings is lenghty.) Is this possible at all? I've been trying to find examples of similar cases but have...
by RubbeH
21 Apr 2023, 07:26
Forum: Ask for Help (v1)
Topic: Create Hotstring from .txt-file. Topic is solved
Replies: 9
Views: 1430

Re: Create Hotstring from .txt-file. Topic is solved

I haven't used this code in a few years, and now when I try to run it I get an error whilst calling Hotstring - Idk if something changed? Any ideas? … I tried checking my ahk version and it seems to be 1.1.23.01 … Error: Call to nonexistent function. Not quite sure how you got that error and even n...
by RubbeH
20 Apr 2023, 09:00
Forum: Ask for Help (v1)
Topic: Create Hotstring from .txt-file. Topic is solved
Replies: 9
Views: 1430

Re: Create Hotstring from .txt-file. Topic is solved

bumping this old thread. I haven't used this code in a few years, and now when I try to run it I get an error whilst calling Hotstring - Idk if something changed? Any ideas? Note: The code might be slightly changed compared to the last time I used it, but I haven't used ahk syntax in years so I got ...
by RubbeH
27 Oct 2020, 03:01
Forum: Ask for Help (v1)
Topic: Hotstring doesn't work when cursor is at the end of the word Topic is solved
Replies: 2
Views: 190

Re: Hotstring doesn't work when cursor is at the end of the word Topic is solved

It might work if you add ? to your hotstring.

Code: Select all

:*?:"!"::»
Btw, no need for returns in single-line hotstrings.
by RubbeH
20 Oct 2020, 02:02
Forum: Ask for Help (v1)
Topic: Multiple Press On 1 Key
Replies: 5
Views: 199

Re: Multiple Press On 1 Key

This works.

Code: Select all

$<::Send, {< 6}
$>::Send, {> 6}
by RubbeH
15 Oct 2020, 02:05
Forum: Ask for Help (v1)
Topic: Repeat 4 time a code Topic is solved
Replies: 2
Views: 143

Re: Repeat 4 time a code Topic is solved

You can probably just add Loop in there.

Code: Select all

F8::
{
MsgBox, 4,, Would you like to continue?
IfMsgBox, No
	return  ; If No
Loop, 4
	{
	Sleep, 5000
	click right, down
	sleep, 57500
	click right, up
	}
}
by RubbeH
14 Oct 2020, 02:51
Forum: Ask for Help (v1)
Topic: How to handle Clipboard and UTF-8?
Replies: 4
Views: 1169

Re: How to handle Clipboard and UTF-8?

Hi! The following works for me, however I'm not sure you can apply this to your script, Perhaps if you put the line FileEncoding UTF-8 at the start of your script it'll work. #Persistent FileEncoding UTF-8 ; This line works if I put it ahead of FileRead. FileRead, text, C:\testptah\test\abcde.txt F1...
by RubbeH
08 Oct 2020, 06:17
Forum: Ask for Help (v1)
Topic: How can I fix these auto replace text?
Replies: 4
Views: 188

Re: How can I fix these auto replace text?

Hello! Since the ? triggers the hotstring even when its inside another word the hotstring uab will automatically send the replacement text (ā) for ab since uab contains ab One way to work around it is to add Case sensitivity however its not great. There might be a better way :*C?:AB::ā :*?:uab::ūa
by RubbeH
08 Oct 2020, 03:47
Forum: Ask for Help (v1)
Topic: Shutdown command making it sleep instead?
Replies: 4
Views: 485

Re: Shutdown command making it sleep instead?

You could make a script something like this to shutdown your computer through cmd.

Code: Select all

F2::Runwait, cmd.exe /c shutdown /s /t 1
add /f to force shutdown
not tested for obvious reasons.
by RubbeH
05 Oct 2020, 06:08
Forum: Ask for Help (v1)
Topic: Making an extended Clipboard
Replies: 3
Views: 323

Re: Making an extended Clipboard

Well, you could do something like this: Indentation and brackets are messed up, sorry about that. Haven't tested it either. #IfWinActive, Your window name F1::test_func() test_func() { Gui, Submit Gui, Destroy Gui, Font, s10 Gui, Add, Text,, ( What text would you like to paste? 1. Test1 2. Test2 3. ...
by RubbeH
24 Sep 2020, 07:57
Forum: Ask for Help (v1)
Topic: Hotkey Problems, getting old
Replies: 3
Views: 375

Re: Hotkey Problems, getting old

Just a thought, It'd be better to shorten your post a bit since it's now a wall of text which might discourage people from even reading your question. I think its a greater chance of getting help if you were to shorten your post and only include your code, the issue, what its supposed to do, and wha...
by RubbeH
24 Sep 2020, 05:15
Forum: Ask for Help (v1)
Topic: Hotstrings Shift stuck.
Replies: 10
Views: 911

Re: Hotstrings Shift stuck.

Hallo, perhaps: stringfile = ( q = Hallo, w = perhaps: test = This is a long ass test-string just for testing purposes, we'll keep this string going for a little while, a little longer.... a little longer.... a little longer.... a little longer.... ) Hotstring := [] stringfile := Trim(stringfile, "...
by RubbeH
24 Sep 2020, 00:22
Forum: Ask for Help (v1)
Topic: Hotstrings Shift stuck.
Replies: 10
Views: 911

Re: Hotstrings Shift stuck.

Hallo, your problem does not occur here. But try: :C*X:TEST::SendInput This is a long ass test-string just for testing purposes, we'll keep this string going for a little while, a little longer.... a little longer.... a little longer.... a little longer.... Oh, yea great! Is there a way to incorpor...
by RubbeH
23 Sep 2020, 07:56
Forum: Ask for Help (v1)
Topic: Hotstrings Shift stuck.
Replies: 10
Views: 911

Re: Hotstrings Shift stuck.

:C*:TEST:: oldClip := ClipboardAll Clipboard := "" Sleep, 50 Clipboard = This is a long test-string just for testing purposes, we'll keep this string going for a little while, a little longer.... a little longer.... a little longer.... a little longer.... ClipWait, 2 Sleep, 100 Send ^v Clipboard :=...
by RubbeH
23 Sep 2020, 04:34
Forum: Ask for Help (v1)
Topic: Hotstrings Shift stuck.
Replies: 10
Views: 911

Hotstrings Shift stuck.

Hello! I found a bug in my hotstrings and Idk what to do about it or if its solveable. :C*:TEST::This is a long ass test-string just for testing purposes, we'll keep this string going for a little while, a little longer.... a little longer.... a little longer.... a little longer.... The problem occu...
by RubbeH
18 Sep 2020, 07:59
Forum: Ask for Help (v1)
Topic: change last Word to capital case?
Replies: 5
Views: 433

Re: change last Word to capital case?

but it is not doing what i like :D does someone has an idea and can help me? Try this: ^+q:: { Clipbak := ClipboardAll ; Back up the Clipboard Send, {shift Down}{Ctrl Down}{Left}{shift Up}c{Ctrl Up} ; Copy the last word into the clipboard. LastWord := Clipboard ; Save the last word you typed sleep ...
by RubbeH
15 Sep 2020, 16:24
Forum: Ask for Help (v1)
Topic: Create Hotstring from .txt-file. Topic is solved
Replies: 9
Views: 1430

Re: Create Hotstring from .txt-file. Topic is solved

That means, you need to know how the next line, after the current A_loopfield , looks like, to decide if it's a multi-liner or not. So, either use a clearer format, or you could do something like this, modifying an existing hotstring (the last one created), if the script discovers that it shouldn't...
by RubbeH
15 Sep 2020, 13:48
Forum: Ask for Help (v1)
Topic: Create Hotstring from .txt-file. Topic is solved
Replies: 9
Views: 1430

Re: Create Hotstring from .txt-file. Topic is solved

Where is the problem? You just parse your text file and then call Hotstring() with this information. Since you create the hotstrings yourself, you should be able to keep an overview (create a list, array, object or whatever), but you can assume that you created all hotstrings which you parsed from ...

Go to advanced search