darksider Posted July 3, 2004 Share Posted July 3, 2004 (edited) Well i got through the basic stuff and now i need help because my scripts don't work right. For instance i need to open, say wordpad and type some stuff. It opens wordpad and just stops. Im including the WinWaitActive element but somthings wrong Edited July 3, 2004 by darksider Link to comment Share on other sites More sharing options...
Developers Jos Posted July 3, 2004 Developers Share Posted July 3, 2004 (edited) Well i got through the basic stuff and now i need help because my scripts don't work right.For instance i need to open, say wordpad and type some stuff.It opens wordpad and just stops. Im including the WinWaitActive element but somthings wrongMake sure the window gets the focus and the title text is correct or else WinWaitActive will wait forever.It helps if you post the script portion you want us to help you with... Edited July 3, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
tutor2000 Posted July 3, 2004 Share Posted July 3, 2004 Well i got through the basic stuff and now i need help because my scripts don't work right.For instance i need to open, say wordpad and type some stuff.It opens wordpad and just stops. Im including the WinWaitActive element but somthings wrongI've noticed sometimes if a window already has focus winwaitactive may not workTry winwaitthen winactivateRick Link to comment Share on other sites More sharing options...
darksider Posted July 3, 2004 Author Share Posted July 3, 2004 Yeah it was the fact that the window was in focus alerady that winwaitactive didn't work. Anyway i've come along a bit and now i need an explanation on how filesavedialog works. the help file just confused me more Link to comment Share on other sites More sharing options...
tutor2000 Posted July 3, 2004 Share Posted July 3, 2004 Yeah it was the fact that the window was in focus alerady that winwaitactive didn't work.Anyway i've come along a bit and now i need an explanation on how filesavedialog works. the help file just confused me moreI use that quite a bitWhat confused you. Keep in my I'm no expert like these guys areRick Link to comment Share on other sites More sharing options...
darksider Posted July 4, 2004 Author Share Posted July 4, 2004 in the example..... My Docs=""::{450D8FBA-AD25-11D0-98A8-0800361B1103} what does this mean Link to comment Share on other sites More sharing options...
tutor2000 Posted July 4, 2004 Share Posted July 4, 2004 in the example.....My Docs=""::{450D8FBA-AD25-11D0-98A8-0800361B1103}what does this meannever seen it b4 looks lke an id numberRick Link to comment Share on other sites More sharing options...
pekster Posted July 4, 2004 Share Posted July 4, 2004 in the example..... My Docs=""::{450D8FBA-AD25-11D0-98A8-0800361B1103} what does this meanIt is a CLSID, and it's a way to referance the "My Documents" folder on a user's computer. You'll notice that typing "My Documents" into an explorer window doesn't do the trick, so you have to use the CLSID instead. A practical use might be if you wanted to open a file select box that started in the users "My Documents" folder. My example works like this: $file = FileOpenDialog("Pick a file","::{450D8FBA-AD25-11D0-98A8-0800361B1103}", "All (*.*)") If @error Then;no file chosen MsgBox(0, "None selected", "You didn't choose a file!") Else;they did pick a file MsgBox(0, "File chosen", "You chose the file: " & $file) EndIf [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
darksider Posted July 6, 2004 Author Share Posted July 6, 2004 (edited) thanks now how would i go about saving a file? AND how would i find a CLSID of anygiven folder? Edited July 6, 2004 by darksider Link to comment Share on other sites More sharing options...
CyberSlug Posted July 6, 2004 Share Posted July 6, 2004 (edited) ...AND how would i find a CLSID of anygiven folder?Look in the help file ("CLSIDs of special folders" in the appendix).To save a file, look at the example of "FileSaveDialog" in the help file. You would typically replace the Else block with something such as FileWrite($filename, $contentsOfTheFile).P.S. You could take a look at the code for AutoPad. It's a script I've abandoned working on--and it probably only compiles correctly with a specific unstable AutoIt-GUI build, but it might be helpful to you. Take a look at the routineSaveAs() function in the Events.au3 file. Edited July 6, 2004 by CyberSlug 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...
darksider Posted July 21, 2004 Author Share Posted July 21, 2004 i recenty encountered a malprocess. i need to make a program that uses a registry entry to start up when windows boots Link to comment Share on other sites More sharing options...
emmanuel Posted July 21, 2004 Share Posted July 21, 2004 i recenty encountered a malprocess. i need to make a program that uses a registry entry to start up when windows bootsthat's an interesting statement. is there a question there?regwrite will do it. "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
Davman Posted July 22, 2004 Share Posted July 22, 2004 you need to add to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run add a string in there with the exe of the file you want run. Sitting comfortably behind the code. Link to comment Share on other sites More sharing options...
Nutster Posted July 22, 2004 Share Posted July 22, 2004 If you want to only have the program run the next time you reboot, write the line in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... Link to comment Share on other sites More sharing options...
ezzetabi Posted July 22, 2004 Share Posted July 22, 2004 Or make a shortcut in @startupfolder , but you have to delete it after the boot. Link to comment Share on other sites More sharing options...
darksider Posted July 26, 2004 Author Share Posted July 26, 2004 yeah ok thanks guys that helped next topic XD sorry im a total newb Is there anyway i could use a function like rand to input a series of random charecters includeing numbers and shift-charecters? Like put some sort of function in a while loop? Link to comment Share on other sites More sharing options...
Omega0505 Posted July 26, 2004 Share Posted July 26, 2004 Hey guys im new and im makin a script that i want to run every time windows starts and i really dont get what you mean by this...you need to add toHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Runadd a string in there with the exe of the file you want run.So i just use regwrite to add this into registry and it'll make my program run every time at startup? Link to comment Share on other sites More sharing options...
pekster Posted July 27, 2004 Share Posted July 27, 2004 (edited) Okay, trying to keep things as simple as possable, if you just want it to run when you log into windows, you just need to add a shortcut of the program to your Startup folder (which is probably something like c:\documents and settings\<USERNAME>\Start Menu\Programs\Startup .) That's it. Once you put the shortcut there, it will start every time you log in.[Edit]: I know you can play with the registry keys as well. It's a pain to do that, and there's no advantage against it simple and adding it to the startup folder in this case.However, if you really mean that you want it to start when windows starts, you need to add it as a system service. The eaisiest way to start any program before you log in is to use the windows task scheduler. Under XP or 2000, you can find this in the "Scheduled Tasks" control panel. Just add a scheduled task, and tell it to start on boot. Please note unless you know what you're doing, your probably don't need to define a task to start on boot. Chances are really good you mean to start it when you log in. Edited July 27, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
darksider Posted July 27, 2004 Author Share Posted July 27, 2004 Yeah glad you cleared that up *BUMP* Hey i had this idea to assign every charecter on the keyboad its own ID number and then jumble those numbers around in an array and then convert them into input It would be a rather painstaking process but unless anyone has any other ideas that may be what i have to work with Link to comment Share on other sites More sharing options...
pekster Posted July 27, 2004 Share Posted July 27, 2004 You just want a random character from a set? Define the set as an array using StringSplit, like this: $array = StringSplit("abcdefghijk...", "") and then pick a random number from 1 to the end of the array like this: $random = $array[int(Random(1, UBound($array)))] It's that simple. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. 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