Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2008
    Posts
    75

    Help With Application.LoadValue(). Bug In The Program, Or My Code?

    I am having some trouble.
    Application.LoadValue() is not returning a value.

    Here is my code.

    In the "On Click" event of the button:
    Code:
    Application.SaveValue("Intro_To_AutoIT", "Lesson Data", "AutoPlay\Docs\BGUIS_1.html");
    My program should then load the value and pass it to a
    browser object on the next page.

    In the "On Show" event of the page:
    Code:
    result = Application.LoadValue("Intro_To_AutoIT", "Lesson Data");
    Web.LoadURL("Web1", result);
    Shouldnt that work?

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    when refering to a local filepath in AMS you must escape the backslash

    "AutoPlay\Docs\BGUIS_1.html"

    should be

    "AutoPlay\\Docs\\BGUIS_1.html"

    also, Application.SaveValue saves the entry to the registry, vista UAC might block access to this registry preventing the key from being saved
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    Oct 2008
    Posts
    75
    Hi,
    Thank you for your reply.

    I did what you said, but it still isnt saving the value.



    I tried checking to see if the value is being saved with a message dialog, but the dialog is popuping empty where it should say the saved value.

    Also, the web object returns an error:
    The address is not valid

    Most likely causes:
    There might be a typing error in the address.
    If you clicked on a link, it may be out of date.

    What you can try:
    Retype the address.

    Go back to the previous page.

    Vista's UAC is turned off. I turned it off a few days after installing Vista.

  4. #4
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Use the full path.

    _SourceFolder.."\\AutoPlay\\Docs\\BGUIS_1.html"
    Dermot

    I am so out of here

  5. #5
    Join Date
    Oct 2008
    Posts
    75
    That did not work eather...

    Modified code:
    The onclick event of the button:
    Code:
    Application.SaveValue(HKEY_CURRENT_USER, "Intro_To_AutoIT", "Lesson Data", _SourceFolder.."AutoPlay\\Docs\\BGUIS_1.html",REG_SZ);
    The on show event of the result page:
    Code:
    result = Application.LoadValue(HKEY_CURRENT_USER,"Intro_To_AutoIT", "Lesson Data",true);
    Web.LoadURL("Web1", result);

  6. #6
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    You are missing a set of \\

    Code:
    Application.SaveValue(HKEY_CURRENT_USER, "Intro_To_AutoIT", "Lesson Data", _SourceFolder.."\\AutoPlay\\Docs\\BGUIS_1.html",REG_SZ);
    Dermot

    I am so out of here

  7. #7
    Join Date
    Oct 2008
    Posts
    75
    Unfortunatly, the same thing happened with the code that you posted above...


    I have a feeling that it isnt setting the data, but I cannot immagion why.


    As I said before, I have tried getting it to show me the data that it is reading, and the msgbox that I have it create comes up blank. That makes me think that it isnt setting the data.

  8. #8
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    OK, the LoadValue action only has 3 arguments, but you are passing 4. You need to lose the first one.

    Code:
    Application.SaveValue("Intro_To_AutoIT", "Lesson Data", _SourceFolder.."\\AutoPlay\\Docs\\BGUIS_1.html",REG_SZ);
    Dermot

    I am so out of here

  9. #9
    Join Date
    Oct 2008
    Posts
    75
    Still doesnt seem to be returning a value. Despite all the changes in the code, nothing seems to be changing.

    I dont understand. Is this a bug in the SDK?

  10. #10
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    This works for me. You actually had 5 arguments instead of 3. I missed the one on the end the last time.

    Code:
    Application.SaveValue("Intro_To_AutoIT", "Lesson Data", _SourceFolder.."\\AutoPlay\\Docs\\BGUIS_1.html");
    
    result = Application.LoadValue("Intro_To_AutoIT", "Lesson Data")
    
    Dialog.Message("Value", result)
    Dermot

    I am so out of here

  11. #11
    Join Date
    Oct 2008
    Posts
    75
    Using the code that you just posted, the dialog comes up empty in the current project for me...
    However, when I create a clean "test" project, it works fine. What is going on??




    :EDIT:
    Wait.. Could it be that having a quick action set forces it to completely ignore the On Click script???
    Last edited by Draygoes; 10-18-2008 at 08:16 PM.

  12. #12
    Join Date
    Oct 2008
    Posts
    75
    Yep that was it!!!!!

    I removed the Quick Action, and placed the following code in the "On Click" event of the button:

    Code:
    Application.SaveValue("Intro_To_AutoIT", "Lesson Data", _SourceFolder.."\\AutoPlay\\Docs\\BGUIS_1.html");
    Page.Jump("Tutorial_Text");
    If anyone else has the same problem, it is because setting a quick action makes it completely ignore scripts.






    Thank you all for your help, and your patiance.

Similar Threads

  1. Article: Using Authenticode Code Signing Certificates
    By Ted Sullivan in forum Setup Factory 8.0 Examples
    Replies: 4
    Last Post: 10-31-2007, 09:03 AM
  2. ANSI To UNICODE Is Finished!
    By coderanger in forum AutoPlay Media Studio 6.0
    Replies: 7
    Last Post: 08-13-2007, 09:27 AM
  3. TrueUpdate 2.0 Update (v2.0.6.0) Released
    By Brett in forum TrueUpdate 2.0
    Replies: 0
    Last Post: 10-31-2006, 01:10 PM
  4. How get Exit Code from program run in setup?
    By Telmo in forum Setup Factory 6.0
    Replies: 1
    Last Post: 12-05-2003, 01:14 PM

Posting Permissions

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