Sign in to follow this  
Followers 0
EndFunc

Array Values

2 posts in this topic

#1 ·  Posted (edited)

I have an array that will show all the values using the array display but when I put it in the For/Next it eliminates one of the valuse because it happens to be the same value of one of my variables.

My 5 variables are different sources but 2($wpaper,$owpaper) happen to be the same value. The array display will show all values but the msgbox in the loop will only msgbox 4, maybe thinking one is a duplicate value. Any suggestions on how to get it show all the values regardless if they are identical or not?

Func uSettings()
Dim $usArray
$WPaper = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\", "Wallpaper")
$oWPaper = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\", "OriginalWallpaper")
$WPaperStyle = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\", "WallpaperStyle")
$QLaunch = @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch"
$OutlkSet = @AppDataDir & "\Microsoft\Outlook\outcmd.dat"
$OutlkSig = @AppDataDir & "Microsoft\Signatures"
$usArray = _ArrayCreate($WPaper,$QLaunch, $OutlkSet,$oWPaper,$OutlkSig)
_ArrayDisplay($usArray,"TEST")
Dim $u
For $u = 1 To UBound($usArray,1) -1 
MsgBox(0,0, $usArray[$u])
Next
EndFunc
Edited by EndFunc

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I have an array that will show all the values using the array display but when I put it in the For/Next it eliminates one of the valuse because it happens to be the same value of one of my variables.

My 5 variables are different sources but 2($wpaper,$owpaper) happen to be the same value. The array display will show all values but the msgbox in the loop will only msgbox 4, maybe thinking one is a duplicate value. Any suggestions on how to get it show all the values regardless if they are identical or not?

Func uSettings()
Dim $usArray
$WPaper = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\", "Wallpaper")
$oWPaper = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\", "OriginalWallpaper")
$WPaperStyle = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\", "WallpaperStyle")
$QLaunch = @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch"
$OutlkSet = @AppDataDir & "\Microsoft\Outlook\outcmd.dat"
$OutlkSig = @AppDataDir & "Microsoft\Signatures"
$usArray = _ArrayCreate($WPaper,$QLaunch, $OutlkSet,$oWPaper,$OutlkSig)
_ArrayDisplay($usArray,"TEST")
Dim $u
For $u = 1 To UBound($usArray,1) -1 
MsgBox(0,0, $usArray[$u])
Next
EndFuncoÝ÷ Ûú®¢×âêÞv+hºÐ¡jxu«­¢+ØÀÌØíÔôÄoÝ÷ ÚÚºÚ"µÍÌÍÝHH
Edited by EndFunc

EndFuncAutoIt is the shiznit. I love it.

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