Jump to content
Macro Express Forums

How to set an integer variable reading a number from text file?

Recommended Posts

How do I set %N[1]% variable to a number that’s inside a text file?

Since variables reset on reboot I wanted to write a number to a text file so I can recall it anytime and place it to an integer variable, but can’t find a way.

eg number.txt contains only “85” string how to assign 85 to %N[1]% ? Would appreciate to see a step by step example or an alternative way step by step to carry out such function. So macros could save and read from file and process the number. Thanx!

Link to comment
Share on other sites

Set to contents of the file to a string variable and do Variable Modify... command to convert it to integer.

I recommend using the Windows registry instead. There you can save it as an integer. 

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