testingtest Posted July 6, 2007 Posted July 6, 2007 #Include <Constants.au3> Opt("TrayMenuMode",1) $Clip = TrayCreateItem("Clip") TrayCreateItem("") $Help = TrayCreateItem("Help") TrayCreateItem("") $About = TrayCreateItem("About") TrayCreateItem("") $Exit = TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = $Clip _Clip() Case $msg = $Help MsgBox(0,"Help","How do I use this? " & @CRLF & @CRLF & "While let me just say it can't get any more simpler just follow below" & @CRLF & @CRLF & "- copy and paste any text or file you want " & @CRLF & "- go in your taskbar and right click on clip " & @CRLF & "- now click on clip " & @CRLF & "- now your text or file are in the same place as you put clip") Case $msg = $About MsgBox(0,"About","-------------------------------------------------" & @CRLF & "Cliper is a simple but useful tool." & @CRLF & "-------------------------------------------------" & @CRLF & " I do not know about you but I use copy and paste everyday." & @CRLF & " I then copy something else and then later on forget something that I pasted for later. " & @CRLF & "While my troubled days are over.") Case $msg = $Exit ExitLoop EndSelect WEnd Func _Clip() $Get = ClipGet() If @error = 1 Then MsgBox(0 , "" , "There is nothing for clip to save...") If @error = 2 Then FileWrite("Files.txt" , $Get) Else FileWrite("Copied Text.txt" , $Get & @CRLF) EndIf EndFunc my problem is when I want to save the file it gives me the path I know I could copy the file from the path and paste in the @scriptdir but what if I copy a file from the internet?
James Posted July 6, 2007 Posted July 6, 2007 Try InetGet. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
testingtest Posted July 6, 2007 Author Posted July 6, 2007 Try InetGet.ty but how will I know what one it is
James Posted July 6, 2007 Posted July 6, 2007 ? Look in the helpfile - INetGet: InetGet("http://www.mozilla.org", "C:\foo.html") InetGet("http://www.autoitscript.com", "C:\mydownload.htm", 1) InetGet("ftp://ftp.mozilla.org/pub/mozilla.org/README", "README.txt", 1) ; Advanced example - downloading in the background InetGet("http://www.nowhere.com/somelargefile.exe", "test.exe", 1, 1) While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(250) Wend MsgBox(0, "Bytes read", @InetGetBytesRead) Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
testingtest Posted July 6, 2007 Author Posted July 6, 2007 (edited) ? Look in the helpfile - INetGet: InetGet("http://www.mozilla.org", "C:\foo.html") InetGet("http://www.autoitscript.com", "C:\mydownload.htm", 1) InetGet("ftp://ftp.mozilla.org/pub/mozilla.org/README", "README.txt", 1) ; Advanced example - downloading in the background InetGet("http://www.nowhere.com/somelargefile.exe", "test.exe", 1, 1) While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(250) Wend MsgBox(0, "Bytes read", @InetGetBytesRead) yes I know about Inetget but the problem is how will I know if a actual file (desktop file) is in the clipboard or a url file Edited July 6, 2007 by testingtest
James Posted July 6, 2007 Posted July 6, 2007 Hmm.. Do some sort of testing. First, clear the clipboard Download the file The errors to see if the clipboard is empty. If not then you have successfully downloaded the file. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
tAKTelapis Posted July 6, 2007 Posted July 6, 2007 yes I know about Inetget but the problem is how will I know if a actual file (desktop file) is in the clipboard or a url fileI guess you would check to see if the file exists on the computer in the location given by the user.. if not, assume it is a URL.and run a regular expression to test the string.
RickL Posted September 20, 2007 Posted September 20, 2007 Hi-- True, I'm a noob-- But I have read the docs and combed this site. In Microsoft Word, I want to be able to take something that is selected and put it into the clipboard, change to Excel and paste it into a cell, after pstikng, move to thenext lower cell, and then return to Word. If Microsoft had Applescript, this would be no problem. The docs for clipput and clipget suggest that one would have to copy the text, not just select it. My carpal tunnel is tired of three fingered congrol codes. Please advise. Thanks! Rick L
James Posted September 20, 2007 Posted September 20, 2007 Talk about reviving an old topic. Take a look at the excel com UDF, ClipGet, ClipPut and Send in the help file. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now