craiganderson Posted April 18, 2014 Share Posted April 18, 2014 (numbered for discussion only) 1) fullscreen := "-fullscreen " . (If (Fullscreen="true") ? ("1") : ("0")) 2) fullResolution := If FullResolution ? ("-fullres " . FullResolution) : ("") 3) Run(executable . " """ . romPath . "\" . romName . romExtension . """ " . fullscreen . " " . fullResolution, emuPath) questions: Is line 1) defining the variable fullscreen to equal a command line"-fullscreen" if certain conditions are met? Is line 3) in addition to running the emulator, also executing a command line command to go fullscreen? thank you craig Link to comment Share on other sites More sharing options...
bleasby Posted April 19, 2014 Share Posted April 19, 2014 1) fullscreen := "-fullscreen " . (If (Fullscreen="true") ? ("1") : ("0")) This is the same as: ;The red part: If (Fullscreen="true") { temp = 1 } else { temp = 0 } ;The rest: fullscreen := "-fullscreen " . temp basically what do you have is a fullscreen variable with values true or false and you want to transform this variable to have values "-fullscreen 1" or "-fullscreen 0" so the possible results for fullscreen after the command are: -fullscreen 1 if the red fullscreen = true or - fullscren 0 if the red fullscreen is not true The only thing is that everything is condensed in one line because you can write if else statements using the "?" and ":" separators if you want smaller code. 2) fullResolution := If FullResolution ? ("-fullres " . FullResolution) : ("") This one just say that if FullResolution has some content, it assumes the value on it preceed by the word -fullres. For example if FullResolution = 2, them the result from this line would be: "-fullres 2". 3) Run(executable . " """ . romPath . "\" . romName . romExtension . """ " . fullscreen . " " . fullResolution, emuPath)[/color][/b] The command line is this: executable . " """ . romPath . "\" . romName . romExtension . """ " . fullscreen . " " . fullResolution so it will write the emulator path followed by the rom name, followed by whatever is set on the fullscreen and fullresolution variables. For example: C:\mame.exe tmnt.zip -fullscreen 1 -fullres 2 Link to comment Share on other sites More sharing options...
craiganderson Posted April 19, 2014 Author Share Posted April 19, 2014 do most emulators "respond" to or "recognize" -fullscreen 1 versus -fullscreen 0??\ the emulator that i am playing around with (xroar) - according to its documentation - just needs to be "told" -fs to go to fullscreen mode.... how would the 1 versus 0 play a role with xroar? or not? thank you very much for your help and patience craig edit so maybe something like this?? If (Fullscreen="true") { temp := "-fs" } else { temp := "" <-------------------------can i do this to send "nothing"?? } fullscreen := temp Run(executable . " """ . romPath . "\" . romName . romExtension . """ " . fullscreen . " " . fullResolution, emuPath) Link to comment Share on other sites More sharing options...
craiganderson Posted April 19, 2014 Author Share Posted April 19, 2014 "fullstring" and "Fullstring" are separate variables? Link to comment Share on other sites More sharing options...
bleasby Posted April 19, 2014 Share Posted April 19, 2014 if it is just that, -fs, just use something like this: fullscreen := If (fullscreen="true") ? "-fs" : "" Run(executable . " """ . romPath . "\" . romName . romExtension . """ " . fullscreen, emuPath) autohotey is case insensitive for variable names except if you change that by setting it yourself. Link to comment Share on other sites More sharing options...
craiganderson Posted April 19, 2014 Author Share Posted April 19, 2014 Cant get it to work If i put -fs in the emulator's config file xroar.conf...........the emulator runs fullscreen But i cant get the module to do it EVEN if i type this in the module Run(executable . " """ . romPath . "\" . romName . romExtension . """ " . "-fs" . " " . fullResolution, emuPath) should "-fs" work as i have it in the line directly above??......... assuming that it works in the config file?? (which it does) Link to comment Share on other sites More sharing options...
bleasby Posted April 19, 2014 Share Posted April 19, 2014 placing something in the command line will not change a emulator configuration except if the emulator does that by himself and expressively states that on its docs. If you want to change the config file text, it is a completely different subject. You have to read the file, know how it is structured and save the info to the file by completely different ahk commands. Maybe you should start trying to learn ahk with simpler things before. Link to comment Share on other sites More sharing options...
craiganderson Posted April 19, 2014 Author Share Posted April 19, 2014 placing something in the command line will not change a emulator configuration except if the emulator does that by himself and expressively states that on its docs. If you want to change the config file text, it is a completely different subject. You have to read the file, know how it is structured and save the info to the file by completely different ahk commands. Maybe you should start trying to learn ahk with simpler things before. Thanks The command line option (i.e. "-fs" most certainly DOES NOT work with this emulator. I figured out how to change the config file with iniwrite however the problem with this emulator (in my very inexperienced opinion) is that it DOES Not want a KEY before the "-fs" in other words in the config file (xroar.conf) -fs all by itself works to run it fullscreen Fullscreen = -fs does nothing this is a problem (i think) because IniWrite and IniDelete expect a Key (i thinK) and if IniDelete doesnt have a key the ENTIRE Section will be deleted. or without a key the iniwrite just keeps adding it to the next line So I think the best I could do is put the following in the notes section ;---------------------------------------------------------------------------- ; Do the following in order to run the emulator in fullscreen mode: ; 1) Create a file called "xroar.conf" and place it in the same folder as the emulator "xroar.exe". ; 2) Inside the file called "xroar.conf" type the following: -fs ; In order to run in windowed mode: erase the -fs text in the "xroar.conf" file. ;---------------------------------------------------------------------------- Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.