Jump to content
Macro Express Forums

Accessing INI files


tthurgood

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.

 

<TVAR2:95:11:userprofile>
<VARSR:05>
<IFOTH:10:1:%userdrive%\Macro Reference Files>
<DOFILE:02:NN:%userdrive%\Macro Reference Files>>
<ENDIF>

<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%>

<ELSE>
<TVAR2:90:01:AB>
<ENDIF><REM2:KANA Signature>
<IFVAR2:1:90:7:TA>
<TVAR2:83:02:FPlease enter your Kana SignatureTFCenter:Center>
<TMVAR2:18:83:00:000:000:H:\Macro Reference Files\Kana.iniKana InfoSignID>
<TMVAR2:19:83:00:000:000:SignID>
<ENDIF>

<REM2:Empathy Statement>
<IFVAR2:1:90:7:TB>
<TVAR2:82:02:FPlease enter your Empathy Statment.TFCenter:Center>
<TMVAR2:18:82:00:000:000:H:\Macro Reference Files\Kana.iniKana Infoempathy>
<TMVAR2:19:82:00:000:000:empathy>
<ENDIF>
<VARSR:01>

 

 

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.

 

 

(Edit)

 

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"

OR

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...

 

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

 

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.

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.

Loading...
×
×
  • Create New...