Jump to content

Get text from a text box, translate it to a varible, and insert the varible into a func


Recommended Posts

Hello.

I'm a novice with AutoIt, but I do understand a majority of the language. The problem I'm running in to is this:

I need to first take two strings of numbers from two different input boxes, and then move those two strings to a variable to be used in place of normal numbers in a function.

I'm working with this UDF http://www.autoitscript.com/forum/index.php?showtopic=20121 and I want to allow users to be able to type in a width (first string) and a height (2nd string) and have those two things substituted in place of the first two numbers in the function.

I have no idea how to do this, and trying to connect the dots is confusing me. I can put it into words, but not code.

If someone could please help me with this I would appreciate it greatly.

Thank you.

Edited by Yata
Link to comment
Share on other sites

Hello.

I'm a novice with AutoIt, but I do understand a majority of the language. The problem I'm running in to is this:

I need to first take two strings of numbers from two different input boxes, and then move those two strings to a variable to be used in place of normal numbers in a function.

I'm working with this UDF http://www.autoitscript.com/forum/index.php?showtopic=20121 and I want to allow users to be able to type in a width (first string) and a height (2nd string) and have those two things substituted in place of the first two numbers in the function.

I have no idea how to do this, and trying to connect the dots is confusing me. I can put it into words, but not code.

If someone could please help me with this I would appreciate it greatly.

Thank you.

You could use inputboxes.

$Value1 = InputBox("New setting","Enter Width")
$Value2 =  InputBox("New setting","Enter Height")
functionToCall($value1,$value2)

Or if you are using inputs (GuiCtrlCreateInput) then read the values from them like this

$Value1 = GuiCtrlRead($input1)
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...