I hereby claim:--
- I am andypiddock on github.
- I am andyp2108 (https://keybase.io/andyp2108) on keybase.
- I have a public key ASB0jpqO7XidjFK-ZWunAjI1bJ-Q_8UoL9ZeRw88hh7XwQo
To claim this, I am signing this object:
I hereby claim:--
To claim this, I am signing this object:
<script> | |
function getURLParameter(e) { | |
return decodeURI((new RegExp(e + "=(.+?)(&|$)").exec(location.search) || [, ""])[1]); | |
} | |
if (getURLParameter("search") === "") { | |
console.log("No URL param value found."); | |
} else { | |
--place a text file on your server , contents "connected" | |
on checkNetStatus | |
local tNetCheck | |
put url ("yoururl/netcheck.txt") into tNetCheck | |
if word 1 of tNetCheck is "connected" then | |
answer "good connection." with "OK" | |
--do other stuff | |
else |
function ConvDate pDate | |
convert pDate to dateitems | |
put item 1 of pDate into tDateY | |
put format("%02d",item 2 of pDate) into tDateM | |
put format("%02d",item 3 of pDate) into tDateD | |
put format("%02d",item 4 of pDate) into tDateH | |
put format("%02d",item 5 of pDate) into tDateMin | |
put format("%02d",item 6 of pDate) into tDateS |
--MD5 Password Generator | |
function hexDigest pvalue | |
put "" into tRes | |
put md5Digest(pValue) into tMD5 | |
get binaryDecode("H*",tMD5,tRes) | |
return tRes | |
end hexDigest |
--Drag image from LC app to another non LC app | |
--Place script into image | |
on dragstart | |
set the dragaction to "copy" | |
put specialfolderpath("temporary") & "/name for your image here.jpg" into tTempImage | |
put the text of img 1 into url("binfile:" & tTempImage) | |
set the dragdata["files"] to tTempImage |
--Gets the colour of a pixel at a x,y co-ordinate | |
--This uses the mouscolor command. | |
on mouseUp | |
put PixelColor(500,500) | |
end mouseUp | |
function PixelColor x,y | |
put the screenMouseLoc into tSaveLoc |
--Check for program running e.g. Notepad | |
on mouseUp | |
put empty into fld "myTaskList" | |
put shell ("TaskList") into fld "myTaskList" | |
if "notepad.exe" is among the tokens of fld "myTaskList" then | |
answer "Notepad is Running" | |
end if | |
end mouseUp |
--OSX (and possibly linux distros): | |
put shell("echo $HOSTNAME") | |
--Windows: | |
put $COMPUTERNAME |