Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2003
    Posts
    3

    Grin Have Autoplay remember my last action when exit and run again

    I am trying to make a check list cd. I have it set to put an arrow next to each button that i press. I need it to keep the arrows next to the buttons i pressed when I take the cd out and put it back in again. That way i can see what programs that i had already ran. I am pretty good with Autoplay but this one is stumping me. Please help

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: Have Autoplay remember my last action when exit and run again

    Just write a registry key containing a number, i.e. lets say you have 8 buttons to remember. let's call 0 "off" and 1 "on". So let's say only buttons 2, 3, and 5 of all 8 are "on", your string would be 01101000 see what I mean?

    Then just write that to the registry on shutdown by creating a key for your app using the registry actions, and then you can set your app to read that registry key on startup and setup your buttons accordingly...

    Corey Milner
    Creative Director, Indigo Rose Software

  3. #3
    Join Date
    May 2003
    Posts
    130

    Re: Have Autoplay remember my last action when exit and run again

    i always use INI files, but registry keys work too ;D

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Re: Have Autoplay remember my last action when exit and run again

    Hey, whatever works... Registry is nice and neat but writing values to an .ini file is perfectly good practice too...

    Corey Milner
    Creative Director, Indigo Rose Software

  5. #5
    Join Date
    Aug 2003
    Posts
    3

    Re: Have Autoplay remember my last action when exit and run again

    Thank you but I am not very good at writing registry keys. It looks simple but could you give me an example of a key that would work and I could go from there. I appreciate your help wow that was fast respond time. 8 minuits at 2:30 in the morning wow.

  6. #6
    Join Date
    May 2003
    Posts
    130

    Re: Have Autoplay remember my last action when exit and run again

    Do a bunch of IF statements for each arrow (if visible = "true", %set#% = 1, else %set#% = 0). Set the variables to something like %set1% %set2% etc.

    Registry > Set Value >
    HKEY_CURRENT_USER
    Subkey: Software\YOURPROJECTNAME
    Value Name: settings
    Value Data: %set1%%set2%%set3%%set4%%set5%

    Then when your program launches have it Registry > Get Value Data (same parameters as above)

    Then use the String actions to get each individual setting. Then break it down with more if statements and more isvisible's [img]/ubbthreads/images/icons/smile.gif[/img]


    It's REALLY difficult to describe.. the help files are a godsend.. keep that in mind [img]/ubbthreads/images/icons/wink.gif[/img]

    I think INI files are much more userfriendly to work with. But theres a little somethin' somethin' to give you a head start with registry keys.

    -Adam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts