ratabase1 Posted September 9, 2007 Share Posted September 9, 2007 Hi, I'm new to Autoitscript, and need some assistance on the best way to go about accomplishing the following: I am going to create a script for some file editing, and plan on compiling it to an exe. What I want to do, is be able to use a hot key to run the compiled exe while I'm inside the file editor. Can this be done? Do I need two files (one for the hot key assignment, and another for my autoitscript exe for use in my file editor)? If so, what would the script for the hot key look like? Any help/suggestions would be greatly appreciated. Also, a little off topic, but does anyone know of a good free file editor that I could use to edit files, and do some txt replacing in certain positions (columns)? Thanks in advance. Link to comment Share on other sites More sharing options...
autocomplex Posted September 9, 2007 Share Posted September 9, 2007 what do you mean by file editor? Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Link to comment Share on other sites More sharing options...
ratabase1 Posted September 9, 2007 Author Share Posted September 9, 2007 what do you mean by file editor?By file editor, I mean SPF/PC which is the file utility I am planning on using at the moment. What I will be doing is pulling each of my files up that needs editing within SPFPC, and run the script to apply the changes. Not sure if this answers your question???? Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 9, 2007 Share Posted September 9, 2007 By file editor, I mean SPF/PC which is the file utility I am planning on using at the moment. What I will be doing is pulling each of my files up that needs editing within SPFPC, and run the script to apply the changes. Not sure if this answers your question????If I understand you correctly you want an uncompiled (.au3) AutoIt script to allow you to use a HotKey (see HotKeySet() in Help)said HotKey will act as a macro and call a second compiled (.exe) AutoIt scriptsaid .exe script will then load files into an editor (SPF/PC) --- modify the files within the editor --- save modified files.exe script will then stop.au3 file will continue to loop until offering the use of HotKey until you exit .au3 scriptIs that what you were thinking? If so I'd suggest one script to do the above including open and close your editor after the files have been modified. And this single script can be compiled or left uncompiled. I do something similar with PSPad and my FTP accounts. Please clarify if I'm off base. Btw, what version of SPF/PC are you using? Link to comment Share on other sites More sharing options...
ratabase1 Posted September 9, 2007 Author Share Posted September 9, 2007 If I understand you correctly you want an uncompiled (.au3) AutoIt script to allow you to use a HotKey (see HotKeySet() in Help)said HotKey will act as a macro and call a second compiled (.exe) AutoIt scriptsaid .exe script will then load files into an editor (SPF/PC) --- modify the files within the editor --- save modified files.exe script will then stop.au3 file will continue to loop until offering the use of HotKey until you exit .au3 scriptIs that what you were thinking? If so I'd suggest one script to do the above including open and close your editor after the files have been modified. And this single script can be compiled or left uncompiled. I do something similar with PSPad and my FTP accounts. Please clarify if I'm off base. Btw, what version of SPF/PC are you using?I hadn't thought about having the script pull up each file. I'd have to think about how I could do that. I have about 175 files I'll be updating, and this will only be a one time use. How would I go about setting it up to open each one of these files? Would I have to list the name of each file, or would there be a way to wildcard?I was originally planning on pulling up a file within SPF/PC and hitting a hotkey which then would execute a script with all of the changes I wanted made to that file. I then would pull the next file up and do the same thing. This will be a one time update per each file.Macromaker allows me to do this, but I'm looking for a way to make the script an exe like autoit, so I don't have to install any additional software other than the exe on the computer that will be doing the updating. It is a work computer and I don't want to install any new software.The version of SPF/PC is 2.10. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 10, 2007 Share Posted September 10, 2007 The version of SPF/PC is 2.10.Good gravy, man! Do you mean THIS SPF/PC?! Why not just carve the tablets with a hammer and chisel?!!! Still, if it works for you, you can certainly use an AutoIt script find files and open them using this, or any other program. Look up FileFindFirstFile() and FileFindNextFile() in the AutoIt help file.Take it in steps. First, try to code a simple script that just uses those commands to display a message box for each file. Once that works and finds the right files, you just replace the line that pops the MsgBox with a call to the function you want to happen on each file.Post your code if you get stuck. This is very doable in AutoIt. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 10, 2007 Share Posted September 10, 2007 I hadn't thought about having the script pull up each file. I'd have to think about how I could do that. I have about 175 files I'll be updating, and this will only be a one time use. How would I go about setting it up to open each one of these files? Would I have to list the name of each file, or would there be a way to wildcard?@PaltyDS - "good gravy ... carve the tablets with a hammer and chisel" -- you a funny dude!@ratabase1 - 175 is just a number, right? Look up the commands PsaltyDS gave you and also _FileToArray(). Point is there's more than one way to skin this cat. After you have the 175 files you want to modify, and provided you'll be doing the same edit to each, you simply loop through your list and your done. If those commands don't give you the flexibility of wildcards you want, then checkout randallc's FileListToArrayNew UDF. 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