James Posted January 13, 2007 Share Posted January 13, 2007 (edited) I can't seem to figure out how to do a first run.I know how to Read & Write to .ini but this seems a bit hard.Can anyone help please?SecureEdit: I should use RegRead and Write. Where should I write the key too? Edited January 13, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Developers Jos Posted January 13, 2007 Developers Share Posted January 13, 2007 I can't seem to figure out how to do a first run.I know how to Read & Write to .ini but this seems a bit hard.Can anyone help please?SecureEdit: I should use RegRead and Write. Where should I write the key too?If it is for running it one time per pc you use " HKLM\Software\YourSoftwareName,keyIf it is for running it one time per User you use " HKCU\Software\YourSoftwareName,key 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...
Paulie Posted January 13, 2007 Share Posted January 13, 2007 I can't seem to figure out how to do a first run.A "First Run"? You mean make it run when the computer starts up? You can add your script to the startup folder, or in the registry in this key: RegWrite('HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', '*Script Name*', 'Reg_sz', '"' & @ScriptFullPath & '"') Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 13, 2007 Moderators Share Posted January 13, 2007 You guys read ebonics well, I couldn't make heads or tails of this post. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
James Posted January 13, 2007 Author Share Posted January 13, 2007 Lol..What I want to do is, when the user first runs the program it will display a message box. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Paulie Posted January 13, 2007 Share Posted January 13, 2007 You guys read ebonics well, I couldn't make heads or tails of this post.Don' you be tellin' me I be readin good... I be readin good all my life dawg.an' don't you be acskin me fo no readin lessins neither. Link to comment Share on other sites More sharing options...
James Posted January 13, 2007 Author Share Posted January 13, 2007 Well that was pointless It would be good if there was something like RegExists Can anyone help? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Helge Posted January 13, 2007 Share Posted January 13, 2007 RegRead + @error-check = RegExists Link to comment Share on other sites More sharing options...
Paulie Posted January 13, 2007 Share Posted January 13, 2007 Lol..What I want to do is, when the user first runs the program it will display a message box.Oh, i get it, you mean like it tells whether or not its been run before?Do something like what JdeB said, put a key in the registry. Link to comment Share on other sites More sharing options...
James Posted January 13, 2007 Author Share Posted January 13, 2007 How can I tell if there is one though? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Developers Jos Posted January 13, 2007 Developers Share Posted January 13, 2007 How can I tell if there is one though?One what? Just do a RegRead() to see if the key is there and what value it has and if not there do a regwrite() All details are in the Helpfile . 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...
James Posted January 13, 2007 Author Share Posted January 13, 2007 I have done it. Thankyou to everyone who sorta helped. Thanks Secure Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Helge Posted January 13, 2007 Share Posted January 13, 2007 What's the deal with you not reading or testing what some people suggests in their posts ? I can remember seeing numerous times where people have told you what's wrong, but where you just seem to ignore them completely if they haven't spelled it out for you completely. It's a matter of respect for others and your interest in solving your problem on your own, where you sometimes seem to lack both. Link to comment Share on other sites More sharing options...
James Posted January 13, 2007 Author Share Posted January 13, 2007 Sorry Helge. Here is what I have and it works, thanks to everyonFunc FirstRun() RegRead("HKEY_CURRENT_USER\Software\BetaPad\Settings", "FirstRun") If @error Then GuiCtrlSetData($DocEd1, "Welcome to BetaPad. It looks like this is your first time running BetaPad.") RegWrite("HKEY_CURRENT_USER\Software\BetaPad\Settings", "FirstRun", "REG_SZ", "Ranb4") EndIf EndFunc Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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