Jump to content
AC Tool Forums
  • Sign Up
Sign in to follow this  
The WABBIT

FormLoad & FormSave

Recommended Posts

I have a question for everyone. Do you use the FormLoad and/or FormSave commands at all. If so, why do you use them and in what cases do you use them?

 

 

Share this post


Link to post
Share on other sites

I did on my old macros to get user input but I found them to be too restrictive and they are the main reason I finally wrote them in C++ that eventually lead to removing ACTool completely out of the picture when I wrote everything in C++ for my macro. It survived 5+ years until Sony screwed around with all macros and I just didn't care to continue for many reasons.

 

For simple things it is nice but there is no way to customize the looks, or anything I needed.

Share this post


Link to post
Share on other sites

From what I see in the code for those two commands, all they ever did was save, and load, the current values/states of the three main components.

 

For the EditBox, it would save the text that is currently in the box.

For the CheckBox, it would save wether or not the checkbox was check.

And for the ComboBox, it would sace the current select item.

 

Since the only reason I can think of to use those two commands, based on their function. Is to save and load default setting for a configuration form. If that is the case it is much easier, at least I think this to be so, is just create a .inc file that has nothing but specific constants defined and set to default values. And load that file with an include and update the file, if necessary, by using a procedure that writes out the file and its contents.

 

And it would also mean that the need to have FormLoad & FormSave removed because they are obselete. Especially now that I fixed what I call the issue with Form not updating when the constants they are using is changed.

 

 

But, I want other peoples input on this. Specifically if they use the two commands, along with why and in what cases they do use them.

 

 

Share this post


Link to post
Share on other sites

It actually worked in conjunction with the form command that throws up a box and asks questions from the user. All of those made me ditch ACTool so long ago for macro writing. They are/were absolutely awesome for the most primitive GUI application but it is also the most generic which is why I did what I did.

 

Yes, I consider them the be AT LEAST deprecated but be careful removing anything as old macros would/could rely up those and this is why Linux will post something as deprecated and that is a signal to not use those for new macros/programs (in the case of Linux) because they could go/be removed at any time and the deprecated tag is just a signal the end is near for them.

Share this post


Link to post
Share on other sites

Not sure if this is right area, I'm looking at boxes, combobox and editbox.

 

Is there a way to auto continue the code, IF, no information is changed.

 

I'm thinking about, for example, using a box to choose where a warp reactor is in the hotkeys and if no changes after a set time,

continue the code. Looked thru the website and couldn't see anything that could be used.

 

Any suggestions? or it cannot be done?

Share this post


Link to post
Share on other sites

Not sure if this is right area, I'm looking at boxes, combobox and editbox.

 

Is there a way to auto continue the code, IF, no information is changed.

 

I'm thinking about, for example, using a box to choose there a warp reactor is in the hotkeys and if no changes after a set time,

continue the code. Looked thru the website and couldn't see anything that could be used.

 

Any suggestions? or it cannot be done?

 

Ego, sorry no. Forms in AC Tool are displayed and then blocks the running of the rest of the script until the user clicks either the OK or Cancel button.

Share this post


Link to post
Share on other sites

 

Not sure if this is right area, I'm looking at boxes, combobox and editbox.

 

Is there a way to auto continue the code, IF, no information is changed.

 

I'm thinking about, for example, using a box to choose there a warp reactor is in the hotkeys and if no changes after a set time,

continue the code. Looked thru the website and couldn't see anything that could be used.

 

Any suggestions? or it cannot be done?

 

Ego, sorry no. Forms in AC Tool are displayed and then blocks the running of the rest of the script until the user clicks either the OK or Cancel button.

 

 

 

What about calling another file right before the form launches, that delays itself for xx amount of minutes/seconds, then clicks the Cancel button if it's there?

Share this post


Link to post
Share on other sites
On 8/30/2019 at 8:50 AM, Anka said:

Can someone give an example on using an .inc file to load data into a form?

  1. We need to see some form of script that you had attempted to write. So that we can help guide you to the script code that you need/want.
  2. If you are using AC Tool v5.4.0 then the only way to save a forms values, and to get them back the next time you display the form. Is by using the FormSave and FormLoad commands.
  3. Now if you are using AC Tool v5.5.1 then there is at least a couple of ways of doing this. what you need to do is look at this post about the new use of Forms in AC Tool v5.5.1. Then you need to open the help file and read up on the File* commands. At this point what needs to be done is based on what you trying to do. How, and when, you want to have the values. How you plan to use the values. How, and when, you plan to save the values. And so on.

 

So now it would be up to you to try creating the code to do what you want it to do. And to post when you are having problems getting your code to work. And Please create a new Thread when you do.

Share this post


Link to post
Share on other sites

I'm simply trying to get my older 5.4 scripts operating in the 5.5.1 version by recreating ...

Form Flax, Settings
  ed1=Combobox:Job:Seeds, Flax, Both              //Job Type
  ed16=Combobox:Seed:Old Egypt
  ed3=Editbox:Batch:1                             //Number of times to run Job
  ed2=Editbox:Seed Plants   (Even Number):2       //Number of beds you want to plant for seeds
  ed4=Combobox:Pick Rounds:1, 2, 3, 4, 5          //Number of times to harvest seeds before ripping out beds
  ed9=Editbox:Seeds / Pick:1                      //Number of seeds per picking
  ed12=Editbox: # of Seeds in Inventory:0         //Number of seeds in Inventory
  ed17=Editbox:Flax plants  (Even Number):14      //Number of Flax plants you want to plant per round
  ed5=Combobox:Weed #:3, 2, 1                     //Total number to Weed and Water a variety of flax
  ed6=CheckBox:Dump:False                         //Toggle to Dump flax in chest
  ed7=CheckBox:Rot:False                          //Toggle to Rot flax
  ed11=CheckBox:Left to Right?:False              //Future Addon
  ed10=CheckBox:Need Water:True                   //Toggle if flax needs to be watered
  ed15=CheckBox:Venery?:False                     //If you are on Venery and have "Test.." in menues
  ed13=EditBox:UnZoom Time:900                    //Time to Zoom Out
  ed14=EditBox:Zoom Time:1000                     //Time to Zoom in
  ed8=Combobox:Resolution:3840x2160, 1920x1080, 1360x768, 1280x1024
end

FormLoad Flax, Flax.frm

 

This form opens at the start of the macro, I make any edits and it saves my settings that are loaded in the next time.  No need for anything to change during the macro.

It did not seem that my help file changed from 5.4 as it still has formload and formsave in the help file.  I wanted to know how to load individual values from a file.

Share this post


Link to post
Share on other sites
17 hours ago, Anka said:

I'm simply trying to get my older 5.4 scripts operating in the 5.5.1 version by recreating ...

Form Flax, Settings
  ed1=Combobox:Job:Seeds, Flax, Both              //Job Type
  ed16=Combobox:Seed:Old Egypt
  ed3=Editbox:Batch:1                             //Number of times to run Job
  ed2=Editbox:Seed Plants   (Even Number):2       //Number of beds you want to plant for seeds
  ed4=Combobox:Pick Rounds:1, 2, 3, 4, 5          //Number of times to harvest seeds before ripping out beds
  ed9=Editbox:Seeds / Pick:1                      //Number of seeds per picking
  ed12=Editbox: # of Seeds in Inventory:0         //Number of seeds in Inventory
  ed17=Editbox:Flax plants  (Even Number):14      //Number of Flax plants you want to plant per round
  ed5=Combobox:Weed #:3, 2, 1                     //Total number to Weed and Water a variety of flax
  ed6=CheckBox:Dump:False                         //Toggle to Dump flax in chest
  ed7=CheckBox:Rot:False                          //Toggle to Rot flax
  ed11=CheckBox:Left to Right?:False              //Future Addon
  ed10=CheckBox:Need Water:True                   //Toggle if flax needs to be watered
  ed15=CheckBox:Venery?:False                     //If you are on Venery and have "Test.." in menues
  ed13=EditBox:UnZoom Time:900                    //Time to Zoom Out
  ed14=EditBox:Zoom Time:1000                     //Time to Zoom in
  ed8=Combobox:Resolution:3840x2160, 1920x1080, 1360x768, 1280x1024
end

FormLoad Flax, Flax.frm

 

This form opens at the start of the macro, I make any edits and it saves my settings that are loaded in the next time.  No need for anything to change during the macro.

It did not seem that my help file changed from 5.4 as it still has formload and formsave in the help file.  I wanted to know how to load individual values from a file.

 

Did you read this?

On 9/10/2019 at 10:58 AM, The WABBIT said:

Now if you are using AC Tool v5.5.1 then there is at least a couple of ways of doing this. what you need to do is look at this post about the new use of Forms in AC Tool v5.5.1. Then you need to open the help file and read up on the File* commands. At this point what needs to be done is based on what you trying to do. How, and when, you want to have the values. How you plan to use the values. How, and when, you plan to save the values. And so on.

Did you follow the link in that, and read what was there?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.