adding websites and IPs to Java Exception

Post your working scripts, libraries and tools for AHK v1.1 and older
wsimon98
Posts: 7
Joined: 29 Oct 2018, 20:26

adding websites and IPs to Java Exception

21 Nov 2018, 04:31

This is a modification of another AHK script I found in this this guy's stuff: https://www.reddit.com/r/AutoHotkey/com ... y_scripts/

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 takes what you have highlighted, and pulls up a prompt, asking if you would like to add that highlighted section to the security exceptions for Java.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 165 guests