Diana (Cda) Posted March 12, 2005 Share Posted March 12, 2005 I have a much-used bat file amongs my AI ones because I happened to have the syntax for it. The bat file is this: "@echo off IF EXIST C:\WINDOWS\DESKTOP\FIREFO~1.TXT ERASE C:\WINDOWS\DESKTOP\FIREFO~1.TXT" It's when a temporary text file is created on the desktop, to clear it before using a browser feature that creates a new text file and so that the old one's info isn't appended to new file. Firstly, can someone advise what the AI code to do the same thing would be. I looked through the help file extensively, but I'm not a programmer so am quite lost. Also, secondly, I now have a job that is right next door to our main branch of our public library. I've been finding life much easier these days to get knowledge. What type of book should I look for that can teach me the fundamentals of a programming language that approximates AI? I looked, again, through the help file, but no luck. Thanks so much! If I can get a book to help me with the second question above, I should be able to start programming on my own much more. :oD Link to comment Share on other sites More sharing options...
MHz Posted March 12, 2005 Share Posted March 12, 2005 Try this code: If FileExists('C:\WINDOWS\DESKTOP\FIREFO~1.TXT') Then FileDelete('C:\WINDOWS\DESKTOP\FIREFO~1.TXT') Autoit also has some macro's, for system folders also. Long filenames are normally accepted with Autoit builtin functions. No special books written for Autoit, to my knowledge. Link to comment Share on other sites More sharing options...
Diana (Cda) Posted March 13, 2005 Author Share Posted March 13, 2005 Awesome!! That worked like a charm! Now _all_ the shortcuts in my AI toolbar are AI. No bat file now <g>! My Firefox broswser has a really neat extension that adds functionality to it re sending text in a webpage to notepad. (The neat thing about this extension is that the date/time and URL are added automatically to the saved text!) I have the desktop as my target directory. Every time you send text, though, it appends to this file automatically even if you save the file. So the saved file is fine, but the text file on the desktop just keeps getting appended to, a problem the next time you want to save a snippet of text. So this little AI script allows me to easily just delete the first saved text file from the desktop, which I do right after saving any snippet so that the next time around, I'm on a fresh notepad page. (p.s., re the LFN issue, I only use 8.3 in bat files, as you can imagine. I left the 8.3 and didn't put the equivalent LFN, but AI was okay with this old format.) Thanks for this! Re literature, I later today found reference that AI is BASIC-like, so that will help tremendously. Thanks once again! Link to comment Share on other sites More sharing options...
CyberSlug Posted March 13, 2005 Share Posted March 13, 2005 Just wondering: What's the name of (or link to) that Firefox extension? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Diana (Cda) Posted March 13, 2005 Author Share Posted March 13, 2005 Rats, sorry! It's called SendTo and it's sooo kewl. It's the second extension found on this page: http://mfe.gorgias.de/I set this SendTo extension to save to "FirefoxSendToData.txt" on my desktop and then this AI script deletes the file if it's there (since I sometimes forget if I've deleted it or not). What is so neat is that I use Metapad, a freeware notepad replacement text editor, that has richedit. So the URLs that SendTo automatically puts in with each saved text piece are clickable. So each text file has the date/time and URL of the saved information. For someone like me who does a lot of research this saves a whole lot of time and since it's all to text files, the resulting space needed is very small.Enjoy! Link to comment Share on other sites More sharing options...
steveR Posted March 13, 2005 Share Posted March 13, 2005 Hmm, I didn't know Metapad had rich edit. If you like Metapad then try out NotePad2. I think it's the best free notepad replacement around. http://www.flos-freeware.ch/notepad2.html AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
Diana (Cda) Posted March 14, 2005 Author Share Posted March 14, 2005 As a long-time member of alt.comp.freeware, I'm sure I've seen it mentioned and more than once. But I've never tried it. Dl it now out of curiousity. Thanks! Link to comment Share on other sites More sharing options...
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