Jump to content
Macro Express Forums

Accessing INI files


Recommended Posts

I am working on a Macro to sent veriables to an .ini file,


for the most part it works, except when i shut down and restart it wont pull from the .ini file it just puts the variable that is setup for the ini files. Here is the code for the file.


<IFOTH:10:1:%userdrive%\Macro Reference Files>
<DOFILE:02:NN:%userdrive%\Macro Reference Files>>

<IFOTH:01:2:H:\Macro Reference Files\Kana.ini>
<TVAR2:90:08:H:\Macro Reference Files\Kana.iniKana InfoSignID>
<TVAR2:90:08:H:\Macro Reference Files\Kana.iniKana Infoempathy>
<MENU2:2:F:90:CenterCenter:Change What?What items do you want to change?Kana Signature =			%SignID%
Empathy Statement=	   %empathy%>

<ENDIF><REM2:KANA Signature>
<TVAR2:83:02:FPlease enter your Kana SignatureTFCenter:Center>
<TMVAR2:18:83:00:000:000:H:\Macro Reference Files\Kana.iniKana InfoSignID>

<REM2:Empathy Statement>
<TVAR2:82:02:FPlease enter your Empathy Statment.TFCenter:Center>
<TMVAR2:18:82:00:000:000:H:\Macro Reference Files\Kana.iniKana Infoempathy>



If anyone sees the problem let me know.

Link to comment
Share on other sites

I noticed that nobody rushed in on this thread! I don't know about others but it would help if you could have reduced to a simpler set of code. Large amounts of code are likely to reduce interest. Anyway, it also helps if you give an actual example of what it pulls up and what it should be pulling up. For example in the first one is it pulling up "%T[90]%" rather than its actual text value. Could you post an extract of the ini file, (obviously) changing any confidential data?

Link to comment
Share on other sites

I'm curious, when you read T90 you set it to SignID and then immediately after set it to empathy. T90 always equals empathy on startup.


Following up on my previous post, I would copy the macro and cut out all the unnecessary stuff for troubleshooting. I would get rid of the creating folder, the selection dialog, all the empathy stuff and only have the SignID code remaining. If you want to change the SignID, add a prompt dialog to do just that. Add a text box after the ini reads to see what is really coming out of the ini on startup. Note the current ini content then restart the PC.





It's also puzzling why the output of the Multiple Choice box is T90. If you just got it from the ini, why would you set it to A or B?


I believe that in the first ini read, the variable currently %[T90]% should be %SignID%, the second read %empathy%.


I can't try running the full macro but it seems that setting T90 to AB allows the user to change both parameters. Shouldn't there be some indication in the Multiple Choice box of this option. Either as "Both" being option C or additional instructions in the Prompt box. If you set T90 to "C" before the Multiple Choice and have an option C "Both", then option C box will be initially checked so the user only has to hit OK. Going this route you would change the two sets of logic to contain:


If Variable %T[90]% Contains "A"


If Variable %T[90]% Contains "C"


ditto for B+C


(Edit) If A or B are the most common response you would set one of those as the preset. Another variation if "Both" were the most common response is to leave the Multiple Choice and logic as it presently is, and preset T90 to AB. When the Multiple Choice box appears, both boxes will be checked. That implies that both is a valid choice. Only OK/Enter is required.

Link to comment
Share on other sites

  • 11 months later...

i know this is probably way to late and this may have been corrected since... but here is somthing that will work for what your looking for...


<TVAR2:40:08:H:\Macro Reference Files\Kana.iniuser infoSignID>
<TVAR2:41:08:H:\Macro Reference Files\kana.iniuser infoempathy>
<MENU2:2:F:90:CenterCenter:Change What?What items do you want to change?Kana Signature         =  %SignID% 
Empathy Statement  =  %empathy%>
<TVAR2:40:02:FPlease enter your Kana Signature.TFCenter:Center>
<TMVAR2:18:40:00:000:000:H:\Macro Reference Files\kana.iniUser InfoSignID>
<TVAR2:41:02:FPlease enter your Empath Statement.TFCenter:Center>
<TMVAR2:18:41:00:000:000:H:\Macro Reference Files\kana.iniUser Infoempathy>


You could even take the first part of the macro and create it as a separate macro so on start up it will collect the information from the .ini file then when you use the macro it will allow you to change what is saved to the .ini...

Link to comment
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.

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.


  • Create New...