I have not played with FileAppend much, but I did get something to work while waiting for the post to be approved. Here's what I ended up coming up with...
Code: Select all
#^C::
AutoTrim Off
ClipboardOld = %ClipboardAll%
Clipboard =
Send ^c
ClipWait 1
if ErrorLevel
return
StringReplace, Hotstring, Clipboard, ``, ````, All
StringReplace, Hotstring, Hotstring, `r`n, ``r, All
StringReplace, Hotstring, Hotstring, `n, ``r, All
StringReplace, Hotstring, Hotstring, %A_Tab%, ``t, All
StringReplace, Hotstring, Hotstring, `;, ```;, All
Clipboard = %ClipboardOld%
SetTimer, MoveCarrot, 10
InputBox, Hotstring, New Exception, Is this the IP address you would like to add to exception.sites for Java?(please keep in mind that if you do not already have at least one entry as an exception, this will not work properly,,,,,,,https://%Hotstring%
if ErrorLevel <> 0
return
FileAppend, `n%Hotstring%, C:\Users\%A_Username%\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites
Reload
Sleep 200
MsgBox, 4,, The IP address just added appears to be improperly formatted.
IfMsgBox, Abort
return
MoveCarrot:
IfWinNotActive, New Hotstring
return
Send {HOME}
Loop % StrLen(Hotstring) + 4
SendInput {Right}
SetTimer, MoveCarrot, Off
return
#Hotstring R
#SingleInstance force
It's a modification of a script I found mixed in with another from a scripter
https://www.reddit.com/r/AutoHotkey/com ... y_scripts/
But I'd really like to understand how to make a script that will add the clipboard to a file with a hotkey or even a hotstring.