Sign in to follow this  
Followers 0
aquila

Set Variables to ""

8 posts in this topic

Hello,

How can i set $1 - $10 to = "" in one line?

$1 = "" & $2 = "" is not working. please help

Share this post


Link to post
Share on other sites



Hello,

How can i set $1 - $10 to = "" in one line?

$1 = "" & $2 = "" is not working. please help

what the purpose of wanting to do this in one line ?

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Global $1 = "", $2 = "", $3 = ""

If that's not what you want, and you want to do something like basic syntax with semicolons, you can't do that.

If that's not it, then I'd suggest re-thinking how others would read your post and be much much more specific.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Well i just want to make a reset button, where all vars will be = "", so i have got 100lines of ="" and this is a little bit lame. Is it possible with for and next?

Share this post


Link to post
Share on other sites

Well i just want to make a reset button, where all vars will be = "", so i have got 100lines of ="" and this is a little bit lame. Is it possible with for and next?

Just use an Array which can be reset with 3 lines whatever number of variables you need.

:)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Just use an Array which can be reset with 3 lines whatever number of variables you need.

:)

Can you give me an example ;)?

Share this post


Link to post
Share on other sites

Dim $a[10]
;
; your code
;
; Reset array
For $x = 0 to 9
   $a[$x] = ""
Next

Well thx :) Working fine.

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