Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2
You last visited: Today at 09:43

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



AutoIt Variable Question

Discussion on AutoIt Variable Question within the Conquer Online 2 forum part of the MMORPGs category.

Closed Thread
 
Old   #1
 
hok30's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 1,366
Received Thanks: 256
AutoIt Variable Question

Another stupid AutoIt Question...
Ok So... I have lets say I have an inputbox called $input and it works fine. So lets say the input box says
Code:
What is your name?
And so the user types
Code:
Bob
I am wondering how to have a message box come up and say
Code:
Hello Bob!
If possible I need whole code. Whoever answers my question gets thanks
hok30 is offline  
Old 03/08/2008, 22:03   #2
 
Coksnuss's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 557
Received Thanks: 65
Quote:
GUICtrlRead ( controlID [, advanced] )
.
Coksnuss is offline  
Old 03/08/2008, 22:06   #3
 
hok30's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 1,366
Received Thanks: 256
I don't get it lol. I just started programming autoit so I have no clue what you are talking about...
hok30 is offline  
Old 03/08/2008, 22:25   #4
 
Hiyoal's Avatar
 
elite*gold: 20
Join Date: Mar 2007
Posts: 2,444
Received Thanks: 1,067
Quote:
Originally Posted by Coksnuss View Post
.
Thats not right, he isnt using GUI Controls.

Ok. You would set it out like this:

Code:
"Variable with the dollar sign"=inputbox("HI!","Hello...Who are you?")

If @error=1 Then
Exit
EndIf

MsgBox(0,"","Your name is " & )
Hope that helps you, what it does is it displays the string "Your name is " and then also gets the variable and adds it to the string using the "&" symbol.

You can also use ""[String]" & @CRLF & "[String2]" in your messagebox parameter #3 which will make a new line so that the sample code would display as this:

Code:
         Title

[String]         ;@CRLF enters down a line and then writes "String2"
[String]

         |OK|
Hope that is in some depth,

Hiyoal
Hiyoal is offline  
Thanks
1 User
Old 03/08/2008, 22:28   #5
 
hok30's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 1,366
Received Thanks: 256
lol I knew you were going to answer... The Code Tags cut off some stuff I am just wondering what they cut off exactly... Can you post it out of the code tags.... (For the first one)


EDIT: I tried it like this and I got an error 0.0
$input=inputbox("HI!","Hello...Who are you?")

If @error=1 Then
Exit
EndIf

MsgBox(0,"","Your name is " & )
hok30 is offline  
Old 03/08/2008, 22:31   #6
 
Hiyoal's Avatar
 
elite*gold: 20
Join Date: Mar 2007
Posts: 2,444
Received Thanks: 1,067
sure...sry bout that:

$input=inputbox("HI!","Hello...Who are you?")

If @error=1 Then
Exit
EndIf

MsgBox(0,"","Your name is " & $input)

There you go
Hiyoal is offline  
Thanks
1 User
Old 03/08/2008, 22:35   #7
 
hok30's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 1,366
Received Thanks: 256
Now I can give you TWO thanks

One more thing. How do I make it so when I press a button... *** happens... so like
OnButtonClick

Or somthing
hok30 is offline  
Old 03/08/2008, 22:40   #8
 
Hiyoal's Avatar
 
elite*gold: 20
Join Date: Mar 2007
Posts: 2,444
Received Thanks: 1,067


Glad I helped out, If you have any more questions you can always PM me

I taught myself quite a lot of AutoIt in a year, and I think I would be one of the people on this section who is "Pro" with the language.

Hiyoal
Hiyoal is offline  
Thanks
1 User
Old 03/08/2008, 22:44   #9
 
hok30's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 1,366
Received Thanks: 256
I agree you are Pr0 lol... (Another Thanks... )
One more thing. How do I make it so when I press a button... *** happens... so like
OnButtonClick

Or somthing
hok30 is offline  
Old 03/08/2008, 22:57   #10
 
elite*gold: 0
Join Date: Mar 2006
Posts: 583
Received Thanks: 182
Quote:
Originally Posted by hok30 View Post
I agree you are Pr0 lol... (Another Thanks... )
One more thing. How do I make it so when I press a button... *** happens... so like
OnButtonClick

Or somthing
in a gui?

if so... it'd look somthing like this



#include <GUIConstants.au3>

$Form1 = GUICreate("Form1", 633, 447, 193, 125)
$Button1 = GUICtrlCreateButton("Button1", 80, 110, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
(put stuff here)
EndSwitch
WEnd
UPSman2 is offline  
Old 03/08/2008, 22:58   #11
 
hok30's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 1,366
Received Thanks: 256
... Well are buttons GUI??? lol yes in a gui
hok30 is offline  
Closed Thread


Similar Threads Similar Threads
Autoit Spezielle Variable
02/07/2010 - AutoIt - 10 Replies
hihi :D ich habe eine frage: kann mir jmd sagen, wie ich in auto it eine variable erstelle, welche ein wort als inhalt zugewiesen bekommt, wobei da wort zufällig auf einer internetseite generiert wird ?? ich habe mir gedacht, dass ich das wort markieren und kopieren lasse und dann das "kopierte" der variable als wert zuweise .... wäre nett, wenn mit jmd helfen könnte :D
AutoIt Question.
11/02/2009 - S4 League - 3 Replies
I asked this in someone else's thread when they inquired about a bot program, but it seems that thread was deleted, because I can't find it even with the search function. Well I wanted to know if AutoIt would work with Games that only accept direct input, without having to use a bypass. There are many games I'm sure you all know of that don't allow input from Auto macro programs to go through. Anyone know off of the top of their heads?
[AutoIT]Variable Conversion
10/30/2009 - AutoIt - 2 Replies
Is there any way to convert a variable into a certain other type? For example: Variable $A should be a float set to 5.01382 however when I bring it into AutoIT, it converts it to an Unsigned Long giving me a different value of something like 1099238427 So basically I just want to know if there is a command, or any way to code a function that can convert Variables set to Unsigned Long into Float/Double/Unsigned Short



All times are GMT +1. The time now is 09:43.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.