Ruud0209
Active Members-
Posts
48 -
Joined
-
Last visited
About Ruud0209
- Birthday 09/02/1968
Profile Information
-
Location
Netherlands
Recent Profile Visitors
306 profile views
Ruud0209's Achievements
Seeker (1/7)
1
Reputation
-
rietjevaldo reacted to a post in a topic:
...exe builder
-
autoit macro generator (SciTE Tools)
Ruud0209 replied to storme's topic in AutoIt General Help and Support
I do have a copy of a version I use here ! Download and unpack the zip to you program filesAutoit3Scite Folder. (You will then have a AutoItMacroGenerator folder there) Put the following in your Scite au3.properties file. command.8.$(au3)="$(SciteDefaultHome)AutoItMacroGeneratorAutoItMacroGenerator02.exe" /Scite command.subsystem.8.$(au3)=1 command.name.8.$(au3)=AutoitMacroGenerator command.shortcut.8.$(au3)=Alt+A command.save.before.8.$(au3)=2 command.replace.selection.8.$(au3)=1 command.quiet.8.$(au3)=1AutoItMacroGenerator.zip -
Hello all, thank you all for your input. I've cleaned up the code a little and made some minor improvements. I could not get the Megablock do exactly what I want so I came up with a different solution where the GUI just starts a new instance and then exits. It's all in the code below for those of you who might be interested... regards, Ruud #NoTrayIcon #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=..\icons\shell32_329.ico #AutoIt3Wrapper_outfile=UptimeCalc.exe #AutoIt3Wrapper_Res_Comment=Uptime Calculator, Watches uptime of a PC and warns user to reboot their PC after 6 days. #AutoIt3Wrapper_Res_Description=Uptime Calculator, Watches uptime of a PC and warns user to reboot their PC after 6 days. #AutoIt3Wrapper_Res_Fileversion=1.2.3.4 #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> #include <Date.au3> #include <Constants.au3> #include <MsgBoxEx.au3> #include <Misc.au3> ; Checks if it is already running and exits if so. If _Singleton("UptimeCalc", 0) = 0 Then Exit ;Define Hotkeys HotKeySet("^+!X", "_exit") ; Ctrl-Shift-Alt-X to exit HotKeySet("^+!x", "_exit") ; Ctrl-Shift-Alt-x to exit AutoItSetOption("TrayMenuMode", 9) ; Default tray menu items (Script Paused/Exit) will not be shown.\ ; define trayicon menu options $guiitem = TrayCreateItem("Show All") $dayssitem = TrayCreateItem("Power") $aboutitem = TrayCreateItem("About") TrayCreateItem("") $rebootitem = TrayCreateItem("Reboot") TraySetState() ;Define variables Global Const $SC_DRAGMOVE = 0xF012 Local $iHours, $iMins, $iSecs Local $tMsg, $tItem1, $iCurrDays Dim $iDays, $openfromtray $iCurrSecs = 0 $iCurrMins = 0 $iCurrHrs = 0 $iCurrDays = 0 $iPostPone = IniRead(@TempDir & "\" & @ScriptName & ".INI", "General", "Postponed", "0") $iloop = 0 ;Function _exit exits the script. Func _exit() Exit EndFunc ;==>_exit ;Define the GUI $frmMain = GUICreate("System :: Uptime", 300, 200, @DesktopWidth / 2 - 145, @DesktopHeight / 2 - 160, BitOR($WS_POPUP, $WS_BORDER)) $lblDays = GUICtrlCreateLabel("00", 8, 8, 15, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $lblSep1 = GUICtrlCreateLabel(":", 23, 8, 10, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $lblHours = GUICtrlCreateLabel("00", 28, 8, 15, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $lblSep2 = GUICtrlCreateLabel(":", 42, 8, 10, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $lblMinutes = GUICtrlCreateLabel("00", 47, 8, 15, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $lblSep3 = GUICtrlCreateLabel(":", 62, 8, 10, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $lblSeconds = GUICtrlCreateLabel("00", 68, 8, 15, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $about = GUICtrlCreateButton("About", 245, 10, 45, 25, $BS_FLAT) $btnWait = GUICtrlCreateButton("Reboot later ...", 10, 130, 280, 25, $BS_FLAT) $Reboot = GUICtrlCreateButton("Reboot Now !", 10, 165, 280, 25, $BS_FLAT) $label4 = GUICtrlCreateLabel("Your computer has been running for more than 0 days" & @CRLF & "", 8, 45, 300, 26) $label1 = GUICtrlCreateLabel("If your computer has been running for more than 6 days" & @CRLF & "you can postpone the reboot only 3 times.(1 hour each time)", 8, 75, 300, 26) $label2 = GUICtrlCreateLabel("", 8, 105, 200, 12) ; Check the GUI for input While 1 ; Move to center if moved WinMove("System :: Uptime", "", @DesktopWidth / 2 - 145, @DesktopHeight / 2 - 160) WinSetOnTop("System :: Uptime", "", 1) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_PRIMARYDOWN _SendMessage($frmMain, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) Case $GUI_EVENT_CLOSE IniWrite(@TempDir & "\" & @ScriptName & ".ini", "General", "Postponed", $iPostPone) For $i = 255 To 0 Step -2 WinSetTrans("System :: Uptime", "", $i) Next GUISetState(@SW_HIDE) Run(@ScriptFullPath) Exit Case $Reboot For $i = 255 To 0 Step -2 WinSetTrans("System :: Uptime", "", $i) Next GUISetState(@SW_HIDE) $ls = "The computer will reboot in <##> seconds. Click OK for an immediate reboot." $liRtnVal = _MsgBoxEx(1 + 48 + 1024, "Reboot", $ls, 30) Select Case $liRtnVal = 1 ;OK FileDelete(@TempDir & "\" & @ScriptDir & ".ini") Shutdown(3) Case $liRtnVal = -1 ;OK FileDelete(@TempDir & "\" & @ScriptDir & ".ini") Shutdown(3) Case $liRtnVal = 2 ;Cancel EndSelect Case $btnWait For $i = 255 To 0 Step -2 WinSetTrans("System :: Uptime", "", $i) Next GUISetState(@SW_HIDE) If $iDays >= 6 Then $iPostPone = $iPostPone + 1 Else $iPostPone = 0 EndIf If $iPostPone <> 0 Then GUICtrlSetData($label2, "You have postponed the reboot " & $iPostPone & " time(s)") GUICtrlSetState($Reboot, BitOR($GUI_DEFBUTTON, $GUI_FOCUS)) EndIf If $iPostPone >= 3 Then GUICtrlSetState($btnWait, $GUI_DISABLE) EndIf If $openfromtray = 1 Then $openfromtray = 0 Else TraySetToolTip("Sleeping : Your computer has been running for " & $iDays & " days.") Sleep(3600000) EndIf Case $about ;GUISetState(@SW_HIDE) GUISetState(@SW_DISABLE) WinSetOnTop("System :: Uptime", "", 0) If FileExists(@WindowsDir & "\Media\chord.wav") Then SoundPlay(@WindowsDir & "\Media\chord.wav") $ls = "This program enforces regular reboots for user PC's to ensure the latest updates en software versions are deployed." & @CRLF & @CRLF & "Contact the ICT Helpdesk Boxmeer for support." & @CRLF & @CRLF $liRtnVal = _MsgBoxEx(0 + 64 + 1024, "about:", $ls, 30) GUISetState(@SW_ENABLE) WinActivate("System :: Uptime") WinSetOnTop("System :: Uptime", "", 1) EndSwitch ; Do the time calculation stuff $GTC = DllCall("kernel32.dll", "long", "GetTickCount") $TSB = $GTC[0] _TicksToTime($TSB, $iHours, $iMins, $iSecs) $iDays = Int($iHours / 24) $iHours = $iHours - ($iDays * 24) If $iSecs <> $iCurrSecs Then If $iDays <> $iCurrDays Then GUICtrlSetData($lblDays, StringFormat("%02i", $iDays)) If $iDays >= 6 Then GUICtrlSetData($label4, "Your computer has been running for more than " & $iDays & " days" & @CRLF & "and requires a reboot.") Else GUICtrlSetData($label4, "Your computer has been running for more than " & $iDays & " days" & @CRLF & "") EndIf $iCurrDays = $iDays EndIf If $iCurrHrs <> $iHours Then GUICtrlSetData($lblHours, StringFormat("%02i", $iHours)) $iCurrHrs = $iHours EndIf If $iCurrMins <> $iMins Then GUICtrlSetData($lblMinutes, StringFormat("%02i", $iMins)) $iCurrMins = $iMins EndIf GUICtrlSetData($lblSeconds, StringFormat("%02i", $iSecs)) $iCurrSecs = $iSecs EndIf If $iDays >= 6 Then WinSetTrans("System :: Uptime", "", 0) GUISetState(@SW_SHOW) For $i = 0 To 255 Step 2 WinSetTrans("System :: Uptime", "", $i) Next EndIf ; Check the trayicon menu for input $msg = TrayGetMsg() TrayItemSetText($dayssitem, "Your computer has been running for " & $iDays & " days.") TrayItemSetState($rebootitem, 4) TrayItemSetState($dayssitem, 4) TrayItemSetState($aboutitem, 4) TrayItemSetState($guiitem, 4) TraySetToolTip("Your computer has been running for " & $iDays & " days.") Select Case $msg = $rebootitem GUISetState(@SW_HIDE) If FileExists(@WindowsDir & "\Media\chord.wav") Then SoundPlay(@WindowsDir & "\Media\chord.wav") $ls = "The computer will reboot in <##> seconds. Click OK for an immediate reboot." $liRtnVal = _MsgBoxEx(1 + 48 + 1024, "Reboot", $ls, 30) Select Case $liRtnVal = 1 ;OK Shutdown(3) Case $liRtnVal = -1 ;OK Shutdown(3) Case $liRtnVal = 2 ;Cancel EndSelect Case $msg = $aboutitem ;GUISetState(@SW_HIDE) GUISetState(@SW_DISABLE) WinSetOnTop("System :: Uptime", "", 0) If FileExists(@WindowsDir & "\Media\chord.wav") Then SoundPlay(@WindowsDir & "\Media\chord.wav") $ls = "This program enforces regular reboots for user PC's to ensure the latest updates en software versions are deployed." & @CRLF & @CRLF & "Contact the ICT Helpdesk Boxmeer for support." & @CRLF & @CRLF $liRtnVal = _MsgBoxEx(0 + 64 + 1024, "about:", $ls, 30) GUISetState(@SW_ENABLE) WinActivate("System :: Uptime") WinSetOnTop("System :: Uptime", "", 1) Case $msg = $dayssitem ; do nothing Case $msg = $guiitem GUISetState(@SW_ENABLE) WinSetTrans("System :: Uptime", "", 0) GUISetState(@SW_SHOW) For $i = 0 To 255 Step 2 WinSetTrans("System :: Uptime", "", $i) Next $openfromtray = 1 EndSelect WEndsystemuptime.au3
-
Hi, Tanks for your input. I've realized just now that the user I tested with (wich I thought was a regular account) was actually a local admin and had there fore right to close the program. Removing this account from the administrators and testing again proved succesfull for Task Manager but when the gui is opened it can still be killed with Alt-F4.... regards, Ruud Sas
-
I'm sorry,I suppose I should've added my code right away. Basicly what i'm trying to accomplish is the following: We, the company I work for that is, want to have our users reboot their PC's at least once every six day to ensure they get the latest version of software and group policy's etc. deployed. We have a thing called "workspace manager" and this runs when a user logs on. With it we can run MSI's, run scripts,programs or batch files (with elevated credentials if needed), create shortcuts, basicly anything we want. I also want to use it to run this script when compiled so it notify's the user if his/hers PC has been running for more than 6 days. With some code I found in the forums I've managed to come up with what you see below. This works, up to the point that if a user does not want to be bothered by it, he can start task manager op activate the gui and kill it. so far for my "unclean" thougts altough I get why one would or could think that... I've attached the source plus the includes (i use one or two older ones) to this post. thank you for any of your thoughts or ideas to improve this... kind regards, Ruud BTW : Can anybody give me a hint on how to prevent a script from being run twice (so that it checks if already running and if so then exits ?) #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=..\icons\shell32_329.ico #AutoIt3Wrapper_outfile=UptimeCalc.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;#NoTrayIcon #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> #include <Date.au3> #include <Constants.au3> #include <MsgBoxEx.au3> AutoItSetOption("TrayMenuMode", 9) ; Default tray menu items (Script Paused/Exit) will not be shown. $guiitem = TrayCreateItem("Show All") $dayssitem = TrayCreateItem("Power") TrayCreateItem("") $rebootitem = TrayCreateItem("Reboot") TraySetState() Global Const $SC_DRAGMOVE = 0xF012 Local $iHours, $iMins, $iSecs HotKeySet("^!X", "_exit") HotKeySet("^!x", "_exit") HotKeySet("^{F4}", "_min") Func _Min() GUISetState(@SW_HIDE) EndFunc ;==>_min Local $tMsg, $tItem1, $iCurrDays Func _exit() Exit EndFunc ;==>_exit $frmMain = GUICreate("System :: Uptime", 300, 200, @DesktopWidth / 2 - 145, @DesktopHeight / 2 - 160, BitOR($WS_POPUPWINDOW, $WS_BORDER), $WS_EX_TOPMOST) ;$frmMain = GUICreate("System :: Uptime", 290, 166, @DesktopWidth / 2 - 145 , @DesktopHeight / 2 - 160, $WS_BORDER, $WS_EX_TOPMOST) ;UISetBkColor(0x000000) $lblDays = GUICtrlCreateLabel("00", 8, 8, 15, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ;UICtrlSetColor(-1, 0x00FF00) $lblSep1 = GUICtrlCreateLabel(":", 23, 8, 10, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ;GUICtrlSetColor(-1, 0x00FF00) $lblHours = GUICtrlCreateLabel("00", 28, 8, 15, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ;UICtrlSetColor(-1, 0x00FF00) $lblSep2 = GUICtrlCreateLabel(":", 42, 8, 10, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ;GUICtrlSetColor(-1, 0x00FF00) $lblMinutes = GUICtrlCreateLabel("00", 47, 8, 15, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ;GUICtrlSetColor(-1, 0x00FF00) $lblSep3 = GUICtrlCreateLabel(":", 62, 8, 10, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ;GUICtrlSetColor(-1, 0x00FF00) $lblSeconds = GUICtrlCreateLabel("00", 68, 8, 15, 15) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ;GUICtrlSetColor(-1, 0x00FF00) $about = GUICtrlCreateButton("About", 245, 10, 45, 25, $BS_FLAT) $btnWait = GUICtrlCreateButton("Reboot later ...", 10, 130, 280, 25, $BS_FLAT) $Reboot = GUICtrlCreateButton("Reboot Now !", 10, 165, 280, 25, $BS_FLAT) $label4 = GUICtrlCreateLabel("Your computer has been running for more than 0 days" & @CRLF & "", 8, 45, 300, 26) $label1 = GUICtrlCreateLabel("If your computer has been running for more than 6 days" & @CRLF & "you can postpone the reboot only 3 times.(1 hour each time)", 8, 75, 300, 26) $label2 = GUICtrlCreateLabel("", 8, 105, 200, 12) $iCurrSecs = 0 $iCurrMins = 0 $iCurrHrs = 0 $iCurrDays = 0 $iPostPone = 0 $iloop = 0 Dim $iDays, $openfromtray While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_PRIMARYDOWN _SendMessage($frmMain, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) Case $GUI_EVENT_CLOSE Exit Case $Reboot GUISetState(@SW_HIDE) $ls = "The computer will reboot in <##> seconds. Click OK for an immediate reboot." $liRtnVal = _MsgBoxEx(1 + 48 + 1024, "Reboot", $ls, 30) Select Case $liRtnVal = 1 ;OK Shutdown(3) Case $liRtnVal = -1 ;OK Shutdown(3) Case $liRtnVal = 2 ;Cancel EndSelect Case $btnWait GUISetState(@SW_HIDE) If $iDays >= 6 Then $iPostPone = $iPostPone + 1 Else $iPostPone = 0 EndIf If $iPostPone <> 0 Then GUICtrlSetData($label2, "You have postponed the reboot " & $iPostPone & " time(s)") GUICtrlSetState($Reboot, BitOR($GUI_DEFBUTTON, $GUI_FOCUS)) EndIf If $iPostPone >= 3 Then GUICtrlSetState($btnWait, $GUI_DISABLE) EndIf If $openfromtray = 1 Then $openfromtray = 0 Else Sleep(3600000) EndIf Case $about GUISetState(@SW_HIDE) GUISetState(@SW_DISABLE) $iMsgBoxAnswer = MsgBox(64, "About :", "This program enforces regular reboots for user PC's to ensure the latest updates en software versions are deployed." & @CRLF & @CRLF & "Contact the ICT Helpdesk Boxmeer for support." & @CRLF & @CRLF, 30) GUISetStyle(BitOR($WS_POPUPWINDOW, $WS_BORDER), $WS_EX_TOPMOST) GUISetState(@SW_ENABLE) GUISetState(@SW_SHOW) WinActivate("System :: Uptime") Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE) EndSwitch $GTC = DllCall("kernel32.dll", "long", "GetTickCount") $TSB = $GTC[0] _TicksToTime($TSB, $iHours, $iMins, $iSecs) $iDays = Int($iHours / 24) $iHours = $iHours - ($iDays * 24) If $iSecs <> $iCurrSecs Then If $iDays <> $iCurrDays Then GUICtrlSetData($lblDays, StringFormat("%02i", $iDays)) If $iDays >= 6 Then GUICtrlSetData($label4, "Your computer has been running for more than " & $iDays & " days" & @CRLF & "and requires a reboot.") Else GUICtrlSetData($label4, "Your computer has been running for more than " & $iDays & " days" & @CRLF & "") EndIf $iCurrDays = $iDays EndIf If $iCurrHrs <> $iHours Then GUICtrlSetData($lblHours, StringFormat("%02i", $iHours)) $iCurrHrs = $iHours EndIf If $iCurrMins <> $iMins Then GUICtrlSetData($lblMinutes, StringFormat("%02i", $iMins)) $iCurrMins = $iMins EndIf GUICtrlSetData($lblSeconds, StringFormat("%02i", $iSecs)) $iCurrSecs = $iSecs EndIf If $iDays >= 6 Then GUISetState(@SW_SHOW) EndIf WinMove("System :: Uptime", "", @DesktopWidth / 2 - 145, @DesktopHeight / 2 - 160) $msg = TrayGetMsg() TrayItemSetText($dayssitem, "Your computer has been running for " & $iDays & " days.") TrayItemSetState($rebootitem, 4) TrayItemSetState($dayssitem, 4) TrayItemSetState($guiitem, 4) TraySetToolTip("Your computer has been running for " & $iDays & " days.") Select Case $msg = $rebootitem GUISetState(@SW_HIDE) $ls = "The computer will reboot in <##> seconds. Click OK for an immediate reboot." $liRtnVal = _MsgBoxEx(1 + 48 + 1024, "Reboot", $ls, 30) Select Case $liRtnVal = 1 ;OK Shutdown(3) Case $liRtnVal = -1 ;OK Shutdown(3) Case $liRtnVal = 2 ;Cancel EndSelect Case $msg = $dayssitem ; do nothing Case $msg = $guiitem GUISetState(@SW_ENABLE) GUISetState(@SW_SHOW) $openfromtray = 1 EndSelect WEnd
-
Plus it calculation is "Last Boot". The other script I tried but gives another value if the system has been in standby. Last boot was 18 hours ago and last coming out of standby was 3.5 ours ago. Different values, different needs, but I like the kernel way over the WMI way. Thanks to the both of you anyway...
-
Starfish - Pokerstars Fish Finder Aid
Ruud0209 replied to Ruud0209's topic in AutoIt Example Scripts
Thanks man, hope it helps The last version is also a lot better since i've built in some error checks. -
Script has been added to the example scripts forumthingy as its kind of OK now thanks for all your help ! http://www.autoitscript.com/forum/index.php?showtopic=71978
-
I made a script wich lets me look for my pokerstats (or my opponents') on a website faster. This site apparently collects tourney results and create stats of them. I'm not a very good programmer but with the help of monoceres i've managed to make it all work they way I wanted so a big thanks goes to him. For those interested: I also have RDP and a Dameware Remote Control Url Protocol Handler (so you can rdp or rc by using rdp:// and rc:// type urls) I'll post them if there is an interest. Enjoy ! Update: Check if Handhistory files exist. Built in enabling of Handhistory saving (needs change to pokerstars user.ini file (SaveMyHands=1)). Should run much better now with less chance of errors. Will restart if correct conditions are not met. StarFish.au3
-
Brilliant ! kudos for you man.
-
Hello again I'm not quite sure how to use this i'm afraid. Well I know a littlebit how to use it but i dont get the array2 error i'm getting C:\Program Files\AutoIt3\Projects\gofish\gofish2.au3 (39) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: If $players[$i]=$array2[$j] Then ContinueLoop 2 If $players[$i]=^ ERROR Since you know my previous script (it has all the players in an array) but i want them unique now, so I can create a listbox with it. #include <File.Au3> #include <array.au3> AutoItSetOption("trayicondebug",1) Dim $players[1]=[0] $files=_FileListToArray("C:\Program Files\PokerStars\HandHistory\Exclusive\","*",1) Dim $latest, $latestdate=-1 For $i=1 To UBound($files)-1 $temp=FileGetTime("C:\Program Files\PokerStars\HandHistory\Exclusive\" & $files[$i],1,1) ;Msgbox(1,"info",$temp & " - : - " & $files[$i]) If $latestdate=-1 Or $temp>$latestdate Then $latest=$files[$i] $latestdate=$temp ; MsgBox(1,"info","Latest = " & $latest & " latestdate = " & $temp & " - : - " & $latestdate ) EndIf Next MsgBox(1,"File is",$latest ) $handle=FileOpen("C:\Program Files\PokerStars\HandHistory\Exclusive\" & $latest,0) If @error Then MsgBox(1,"Error","") Do $temp=FileReadline($handle) ;Msgbox(1,"Error",@error) If @error = -1 Then ExitLoop If StringLeft($temp,4)="seat" Then ReDim $players[Ubound($players)+1] ;MsgBox("1","info",$players) $data=StringMid($temp,StringInStr($temp,":")+2,StringInstr(StringTrimLeft($temp,6),")")) $players[UBound($players)-1]=StringLeft($data,StringInStr($data," ")-1) EndIf Until False ;_ArrayReverse($players) ;dim $array[69]=[3,4,5,2,3,5] dim $array2[1] For $i=0 To UBound($players)-1 For $j=0 To Ubound($players)-1 If $players[$i]=$array2[$j] Then ContinueLoop 2 Next ReDim $array2[Ubound($array2)+1] $array2[Ubound($array2)-1]=$players[$i] Next _ArrayDisplay($array2)