Jump to content
Sign in to follow this  
UniStudent

Save to .bat

Recommended Posts

UniStudent

dose any one know how to get user options (i.e. the names of radio buttons the users has selected) saved to a .bat file when a button is pressed

for example i would like a user to be able to select from a bunch of options both radio buttons and input boxes, then that data would be written to a .bat file (for example if the user selected radio button a and c the the names say A and C would be saved to a .bat file) when the user presses a button

cheers guys

Share this post


Link to post
Share on other sites
Vindicator209

Now, do you mean radio buttons on ur own GUI? if so, use GuiRead to read them, then FileWrite("something.bat","line")

however the radio buttons are a bit different.. i dont know how to explain that though, you'll have to treat it like a button


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites
UniStudent

tar for the help ill give it a go see what happens

Share this post


Link to post
Share on other sites
UniStudent

i tryed using these comand but Autoit dont seem to recognise them , GuiRead to read them, then FileWrite("something.bat","line")

maby i can explain a bit better so you guys might be able to offer me a little more help, right i dont supose it needs to be a radio button a tree view item would be better. so what i want is this i would like the user to be able to check the tree view iteam box then when a button is presed all the selected iteams tag names i.e. box 1, box 2 etc are saved into a .bat file

any thoughts

Share this post


Link to post
Share on other sites
FreeFry

I think you have to explain a little deeper into what you mean with 'saving to a .bat-file'

Edited by FreeFry

Share this post


Link to post
Share on other sites
UniStudent

well i want to save items such as this (dir c:\windows dir c:\windows\system) so for example if the user checked the box with windows as the titel it would save dir c:\windows into a file (somthing.bat) when a button is pressed at the end. the idear is to make gui options for the usere, they select the options they want in the tree view, then save all the options at the end into a batch file, this file will then be used to operat an external program.

hope this is abit more clear? you guys might even have a better soloution othere than batch files

Share this post


Link to post
Share on other sites
FreeFry

Hmm, I'm having a hard time understanding exactly what it is that you want to do, I think you have to post your script you have atm. :)

Share this post


Link to post
Share on other sites
PsaltyDS

well i want to save items such as this (dir c:\windows dir c:\windows\system) so for example if the user checked the box with windows as the titel it would save dir c:\windows into a file (somthing.bat) when a button is pressed at the end. the idear is to make gui options for the usere, they select the options they want in the tree view, then save all the options at the end into a batch file, this file will then be used to operat an external program.

hope this is abit more clear? you guys might even have a better soloution othere than batch files

Just create an INI file using IniWrite() to save your values, and IniRead() to get them back:

[FileOptions]
Input1=C:\Windows
Radio1=0
Radio2=1
Radio3=0

[ExecOptions]
Input2=Dingleberry.exe
Checkbox1=0
Checkbox2=1
Radio4=1
Radio5=0

Is that the kind of thing you are talking about?

:rolleyes:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
SpookMeister

well i want to save items such as this (dir c:\windows dir c:\windows\system) so for example if the user checked the box with windows as the titel it would save dir c:\windows into a file (somthing.bat) when a button is pressed at the end. the idear is to make gui options for the usere, they select the options they want in the tree view, then save all the options at the end into a batch file, this file will then be used to operat an external program.

hope this is abit more clear? you guys might even have a better soloution othere than batch files

Give us an example of what you want the batch file (or whatever) to look like under assorted different selections

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites
UniStudent

thanks guy big help :rolleyes:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×