USslang Posted July 19, 2018 Report Share Posted July 19, 2018 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! Quote Link to comment Share on other sites More sharing options...
Cory Posted July 19, 2018 Report Share Posted July 19, 2018 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. Quote Link to comment Share on other sites More sharing options...
Samrae Posted July 19, 2018 Report Share Posted July 19, 2018 Try "Variable Modify String %StrVar%: Convert to Integer (%IntVar%)" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.