Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2007
    Posts
    452

    Star code help please

    i have this code on a button click and it set value to ini file but if i leave input dialog empty then i get that (C stack overflow) error next time i run the app...

    button click code:
    Code:
    if getrefreshtime ~= nil then
    	strNum = String.ToNumber(String.Replace(getrefreshtime.Displayed, " ", "", false));
    	INIFile.SetValue("AutoPlay\\Docs\\options.ini", "RefreshTime", "time", strNum);
    	strNum = strNum * 1000
    	timer2 = Timer.StartTimer("Plugin2", 101, strNum);
    end

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    When you say "next time you run the app" do you mean you shut the exe down and then reopen it? or next time you press the button?

    Try stopping the timer before you close the exe. (just a guess)


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  3. #3
    Join Date
    Mar 2007
    Posts
    452
    yes i shut down the exe and reopen it... it writes to ini file like that if i leave dialog input empty

    Code:
    [RefreshTime]
    time=0
    and when it is "time=0" then i get error but if it is "time=" the i dont...

  4. #4
    Join Date
    Mar 2007
    Posts
    452
    when it is "time=0" in ini file then i get error but if it is "time=" the i dont... i have this code but if i leave dialog empty it set that data to ini file "time=0" ???

    Button Click Code :
    Code:
    if getrefreshtime ~= nil then
    	strNum = String.ToNumber(String.Replace(getrefreshtime.Displayed, " ", "", false));
    	INIFile.SetValue("AutoPlay\\Docs\\options.ini", "RefreshTime", "time", strNum);
    	strNum = strNum * 1000
    	timer2 = Timer.StartTimer("Plugin2", 101, strNum);
    end
    Page On Show Code :
    Code:
    strNum = String.ToNumber(INIFile.GetValue("AutoPlay\\Docs\\options.ini", "RefreshTime", "time"));
    Inı File Data :
    Code:
    [RefreshTime]
    time=0
    Timer Plugin Code :
    Code:
    strNum = String.ToNumber(strNum); 
    if strNum == 0 then 
    Page.StopTimer(); else
    url = Input.GetText("AddressTxt");
    if url == "" then 
    Page.StopTimer(); else
    IExplorer.Navigate("Plugin1", url);
    count=count+1
    Input.SetText("Input1", count);
    end
    end

  5. #5
    Join Date
    Mar 2007
    Posts
    452
    i attached the apz file... can some one help with that please ?
    Attached Files

  6. #6
    Join Date
    Jul 2007
    Posts
    1,512
    I am getting no errors at all....... can u screen shot them no errors no nothing here

  7. #7
    Join Date
    Mar 2007
    Posts
    452
    does it function ? is it working fully ???

  8. #8
    Join Date
    Jul 2007
    Posts
    1,512
    well i get no errors if it live it 0 or blank so no errors you should your leving it blank as there is spacebars there it so its not "" its " " maybe thats your problem

  9. #9
    Join Date
    Mar 2007
    Posts
    452
    no it doesnt refresh !!! there is something wrong with code but i couldnt figure out !!!

  10. #10
    Join Date
    Jul 2007
    Posts
    1,512
    i will look if i have time later

  11. #11
    Join Date
    Mar 2007
    Posts
    452
    i still need hepl with that... it doesnt work i dont understand why ???

    Download

  12. #12
    Join Date
    Nov 2006
    Posts
    233
    works fine for me too, although you could change

    Code:
    if getrefreshtime ~= nil then
    	strNum = String.ToNumber(String.Replace(getrefreshtime.Displayed, " ", "", false));
    	INIFile.SetValue("AutoPlay\\Docs\\options.ini", "RefreshTime", "time", strNum);
    	strNum = strNum * 1000
    	timer2 = Timer.StartTimer("Plugin2", 101, strNum);
    end

    To this so if its 0 it will always write it as a blank string

    Code:
    if getrefreshtime ~= nil then
    	strNum = String.ToNumber(String.Replace(getrefreshtime.Displayed, " ", "", false));
    		
    		if strNum == 0 then
    		INIFile.SetValue("AutoPlay\\Docs\\options.ini", "RefreshTime", "time", "");
    		
    		else
    		INIFile.SetValue("AutoPlay\\Docs\\options.ini", "RefreshTime", "time", strNum);
    	
    		end
    	
    	strNum = strNum * 1000
    	timer2 = Timer.StartTimer("Plugin2", 101, strNum);
    end

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. Progress Bars screen, On Start code is skipped
    By AxemanMK in forum Setup Factory 7.0
    Replies: 7
    Last Post: 09-21-2006, 02:15 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