Sign in to follow this  
Followers 0
Kokodajs

Changing values inside program

4 posts in this topic

Hello all

So i have a problem: i have written a program i want, but for different tasks i need different values (values that change a lot), one of them is time intervals. for easyer understanding (and because my english is not so good)i ll give u example of what i mean. in current programm i have a line:

Dim $time = 100

AdlibRegister ( "Func1" [, $time] ) ;this might not be exactly the same as in my programm (im at work so i just copy - paste autoit help)

what i need is for my programm to have option that when i start it it asks me what values would i like to have as variable, lets say when i run my proggy a window pops up, i enter number (e.g. 200), and that number is than used as that variable, in my example $time = 200. of course my programm has alot of variables and thats why editing it all the time is tiresome. if anyone knows how to do this or other elegant solution to my problem, it ll be really a lot of help.

(i hope you understand what i mean, otherwise ill explane again ;) )

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Something like that ?

$answer = Number ( InputBox ( "proggy", "Enter the value", 200, "", -1, -1, 0, 0 ) )
ConsoleWrite ( "$answer : " & $answer & @Crlf )
Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Something like that ?

$answer = Number ( InputBox ( "proggy", "Enter the value", 200, "", -1, -1, 0, 0 ) )
ConsoleWrite ( "$answer : " & $answer & @Crlf )

TY alot, i havent tryed, but i think this is it ;):) the only thing im concerned is how will it know which variable i need to change ?? or is $answer the variable that will be changed ? (i think so at least ;)) im still nob at autoit, i have big problem coz i dont know all teh functions. thank you again for your help

Share this post


Link to post
Share on other sites

TY alot, i havent tryed, but i think this is it ;):) the only thing im concerned is how will it know which variable i need to change ?? or is $answer the variable that will be changed ? (i think so at least ;)) im still nob at autoit, i have big problem coz i dont know all teh functions. thank you again for your help

Glad to help you ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0