Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v1) • Re: Hotstrings() to call function

$
0
0
Hi, I'm trying to do the same with v2 but I get an Error: Too many parameters passed to function.

This is my code:

CODE:

Hotstring(":?oX:" newHotstring, paste.Bind(path))


What's wrong?

Thank you.


CODE:

#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[2])))

paste(text) {
ClipSave := ClipboardAll
Clipboard := text
Send ^v
Sleep 100
Clipboard := ClipSave
}

Statistics: Posted by Insaid — Today, 10:54



Viewing all articles
Browse latest Browse all 579

Trending Articles