24 March 2021, 14:26 | #1 |
Registered User
Join Date: Oct 2009
Location: Crewe, UK
Posts: 146
|
Hollywood Designer, Save Page on Exit. help
So anyone on here use Hollywood and Hollywood Designer?
on my next update for Amilion, I would love it to be able to save which page its on, on exit, I guess I would put code on the exit button, and then code on start up, so it check which page to start on, trouble is I kind of not sure what the code would be. I thinking of creating a external txt file that would save a number 1 to 6 on exit depending on the page your on and hollywood on boot would check the number and go to that page. Anyone know how I would go about doing this? Cheers So far I have a Setting.txt file with just "1" in the file so to test Hollywood is reading it, I have OpenFile(1, "setting.txt") pageset = ReadLine(1) CloseFile(1) SetLayerStyle("pagetxt",{text=pageset}) On text entry "pagetxt" it display the number 1 On exit I have this when exit page 1 OpenFile (1, "setting.txt", #MODE_WRITE) WriteLine(1, "1") Closefile(1) Code for page 2 OpenFile (1, "setting.txt", #MODE_WRITE) WriteLine(1, "2") Closefile(1) This works and changes the setting.txt number to 2 and on next load up of the app it displays the number 2 Now I just need to figure out how to get Hollywood to jump to Page 2 if pageset = 2 Last edited by amigang; 24 March 2021 at 14:39. |
24 March 2021, 23:03 | #2 |
Registered User
Join Date: Oct 2009
Location: Crewe, UK
Posts: 146
|
https://forums.hollywood-mal.com/vie...hp?f=14&t=3274
hope you can follow this image new page 1 identify is page001 rectangle 250 is basically the button that would save the page the user on into the Table "page001" On removing this code, the app works, so it got to be something here?, checking the syntex it says error on line 3, Switch SettingsTable.PageTxt Case "page001" %>"page001" Case "page002" %>"page002" EndSwitch Running the app it says Syntex error in Object "B??o" no idea what Object that is as this is a very simple test app I made to see if I could get this to work. Tried %>PAGEID "page001" but not sure if that how the code should work. uploaded my very basic Designer app with this code https://amigang.com/software/wite2.lha Thanks for you help, or if anyone else can shed light on what Im doing wrong. cheers |
25 March 2021, 11:58 | #3 |
Registered User
Join Date: Oct 2009
Location: Crewe, UK
Posts: 146
|
You know persistency pay off, after trying a number of different codes, this one works!!!! Plus renaming the Page Name page001
Code: Select all Switch SettingsTable.PageTxt Case "page001" %>page001 Case "page002" %>page002 EndSwitch , this is one of the very few time the manual let me down, as I could not even find the code to change page in the doc plus no example of how to use the code. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hollywood Designer 5.0 Special Edition now available | softwarefailure | News | 0 | 06 September 2020 15:51 |
Hollywood Designer 5.0: The Return of a Legend released | softwarefailure | News | 4 | 23 April 2020 18:01 |
Hollywood: Crash Course to Hollywood Programming | jPV | Coders. Tutorials | 0 | 02 November 2017 18:03 |
Hollywood with Designer Tutorial Videos | Bugala | Amiga scene | 7 | 28 February 2016 22:49 |
Hollywood Designer since the author no longer sells it | themamboman | request.Apps | 1 | 13 February 2013 15:16 |
|
|