Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 22:22

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

Advertisement



Problem: Variable

Discussion on Problem: Variable within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2011
Posts: 244
Received Thanks: 18
Problem: Variable

Ich möchte das Scripten lernen. Ich habe ein Problem. Mein Problem ist es, dass ich keine Variablen setzen kann. Mir wurde gesagt, dass ich ein $-Zeichen vor der Variable setzen muss. Damit sie als Variable anerkannt wird. Grundsätzlich verändert sich die Farben, wenn man die Funktion ausführt, aber bei mir verändert sich die Farbe nicht. Was mache ich falsch ? Ich kann sie auch nicht als Variable verwenden. Bsp: $Variable1
Variable1 wird in der Farbe nicht verändert. Und ich kann es nicht definieren.
Ezio534 is offline  
Old 11/19/2012, 17:17   #2
 
elite*gold: 0
Join Date: Aug 2011
Posts: 442
Received Thanks: 78
Code would help with the issue but yes variables are normally written like this...

$var = "Hello world"

MsgBox(0, "Title", $var)


$var = "Ezio"
MsgBox(0, "Title", "my name is " & $var)

$var1 = "Hello"
$var2 = "World"
MsgBox(0, "Title", $var1 & $var2)

$var1 = "Hello"
$var2 = "World"
$joined = $var1 & $var2
MsgBox(0, "Title", $joined)
logical691 is offline  
Old 11/19/2012, 17:43   #3
 
elite*gold: 0
Join Date: Aug 2011
Posts: 244
Received Thanks: 18
Quote:
Originally Posted by logical691 View Post
Code would help with the issue but yes variables are normally written like this...)
Why it does not work for me?
I write it, like you said it.
Ezio534 is offline  
Old 11/19/2012, 20:03   #4
 
elite*gold: 0
Join Date: Dec 2007
Posts: 47
Received Thanks: 18
could you paste the code itself?
Most of the Autoit Problems are "Typing Errors"
RenzoARG is offline  
Old 11/19/2012, 20:30   #5
 
elite*gold: 0
Join Date: Aug 2011
Posts: 442
Received Thanks: 78
Quote:
Originally Posted by Ezio534 View Post
Why it does not work for me?
I write it, like you said it.
So your non working code is that secretive you dont want help? Oh ok, i guess you need to figure out the problem yourself then or hire a coder.
logical691 is offline  
Old 11/19/2012, 23:11   #6
 
elite*gold: 0
Join Date: Dec 2007
Posts: 47
Received Thanks: 18
Okey... A basic Variable
$secret = "red"
^Var^ ^value^

Whenever you call $secret, what the script really does is call in the value.
For example:
$secret = red

msgbox (0,"blah","your value of $secret is: " & $secret)
^1^ ^2^ ^3^

1: command
2: Variable name inside a string, thi counts as plain text
3: Variable being called, this counts as the value.

Translated: msgbox (0,"blah","your value of $secret is: red")

•••••••••••••••••••••••••••••••••••••••••••••••••• ••••••••

PD: Using messages as a pause is really useful if you want to know step by step whats going on in your script.

That's as much as I can Help guessing what's going on, since it was a common error for me to set a $var in between a string, when I was starting.
RenzoARG is offline  
Old 11/19/2012, 23:36   #7
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
wenn du sein erstes bsp script ausführen tust, klappt es denn?
wenn ja ist dein problem nur das es nihct farblich dargestellt wird.
google dann mal nach "scite" und lad dir den runter (ist´n editor für au3), soweit ich mich erinnere stellt er auch die sachen farblich dar.
wenn nicht muss tdu mal in den optionen irgendwo schauen, mann konnte einstellen, was in welcher farbe dargestellt werden soll
omer36 is offline  
Old 11/20/2012, 14:25   #8
 
elite*gold: 0
Join Date: Aug 2011
Posts: 244
Received Thanks: 18
Quote:
Originally Posted by omer36 View Post
wenn du sein erstes bsp script ausführen tust, klappt es denn?
wenn ja ist dein problem nur das es nihct farblich dargestellt wird.
google dann mal nach "scite" und lad dir den runter (ist´n editor für au3), soweit ich mich erinnere stellt er auch die sachen farblich dar.
wenn nicht muss tdu mal in den optionen irgendwo schauen, mann konnte einstellen, was in welcher farbe dargestellt werden soll
Mich stört es, dass es nicht farblich angezeigt wird.
Ich lerne seit gesten zu Skripten.
Zur Visualisierung wäre es besser, wenn es farblich dargestellt wird.
Ezio534 is offline  
Old 11/20/2012, 16:25   #9
 
elite*gold: 0
Join Date: Aug 2011
Posts: 442
Received Thanks: 78
I dont speak German, but i see no code has been posted so you obviously dont want help other wise code would be here with the issue and it would be fixed.

The only person stopping you from learning and fixing the issue is you Ezio.
I will not re-check this thread to help, its just wasting my time now.
logical691 is offline  
Old 11/23/2012, 00:30   #10
 
BlueBasHeR's Avatar
 
elite*gold: 25
Join Date: Nov 2011
Posts: 266
Received Thanks: 60
Also dein Problem ist, die Farbe ändert sich nicht bei einer VAriable? also du willst es so haben: $Test

Lade dir Scite4AutoIt vllt hast du es bereits ka

Drück CTRL + 1 und dann öffnet sich ein neues fenster
Oben gibt es dann ein tab das heißt "Color Settings" dann zeigt er dir die Schriftarten.. geh unter "Variable"dann in der Reihe auf "Fore" und wähl deine farbe dann Save + Apply und fertig

MfG Blue
BlueBasHeR is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Byte Variable Problem
12/19/2011 - C/C++ - 11 Replies
Hallo. Ich schreibe an einem programm, das mit der funktion "WriteASM" einen Byte in eine Bestimmte Addresse schreiben soll. Dieser Byte, soll aus einer EditBox ausgelesen werden. In die Editbox soll nun z.B. FD, FE, FC oder irgendein Byte geschrieben werden. Dann soll WriteASM eben diesen byte so übernehmen und in die Addresse schreiben.
Überprüfen ob Variable Eine Variable ist
10/16/2010 - AutoIt - 26 Replies
Hey leute ich wollte fragen ob/wie man überprüfen kann ob eine Variable eine Variable ist z.b. so $k = 1 $i = $k if $i = VARIABLE Then msgbox(0,'$i ist eine variable!!','') endif PS:Wp releast man nochma TuT (z.b. für metin2??)
Problem error: Subscript used whit non-Array variable "
08/26/2010 - Last Chaos - 1 Replies
hey leute, seitdem mein laptop ein windows update gemacht hat funktioniert der ultra bot nicht. es dann kommt immer die fehlermeldung " error: Subscript used whit non-Array variable " vor diesem update ging der bot noch.
[Problem] Inputbox(GUI) auslesen und als Variable speichern
08/08/2010 - AutoIt - 8 Replies
Hallo, ich bin neu hier und habe ein Problem mit Autoit hier erstmal das Script : #include <ButtonConstants.au3> #include <EditConstants.au3>



All times are GMT +1. The time now is 22:23.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.