Jump to content

Recommended Posts

  • Developers
Posted

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

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.
  :)

Posted

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

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.

Posted

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

Posted

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.

  • Developers
Posted

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.
  :)

Posted

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.

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...