Sign in to follow this  
Followers 0
James

How to First Run

14 posts in this topic

#1 ·  Posted (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?

Secure

Edit: I should use RegRead and Write. Where should I write the key too?

Edited by Secure_ICT

Share this post


Link to post
Share on other sites



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?

Secure

Edit: 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,key

If it is for running it one time per User you use " HKCU\Software\YourSoftwareName,key


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 & '"')

Share this post


Link to post
Share on other sites

You guys read ebonics well, I couldn't make heads or tails of this post.


[center]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.[/center]

Share this post


Link to post
Share on other sites

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.

:):D

Share this post


Link to post
Share on other sites

RegRead + @error-check = RegExists

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 .


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Sorry Helge. Here is what I have and it works, thanks to everyon

Func 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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0