ReDFlaG Posted October 23, 2014 Share Posted October 23, 2014 Hi Little issue with that simple code, may someone tell me why i can' t have the array displayed ? #include <Timers.au3> #include <Array.au3> #include <GUIConstantsEx.au3> $mainwindow = GUICreate("TEST", 400, 320) GUISetState(@SW_SHOW) global $arr_switch[5] = ["Item 0", "Item 1", "Item 2", "Item 3", "Item 4"] Func _AutoRefresh($hWnd, $Msg, $iIDTimer, $dwTime) #forceref $hWnd, $Msg, $iIDTimer, $dwTime _ArrayDisplay($arr_switch) EndFunc $autorefresh=_Timer_SetTimer ($mainwindow,6000,"_AutoRefresh") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Thanks Link to comment Share on other sites More sharing options...
Danyfirex Posted October 23, 2014 Share Posted October 23, 2014 Use consolewrite. don't pause your script. saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Danyfirex Posted October 23, 2014 Share Posted October 23, 2014 or use adlibregister #include <Timers.au3> #include <Array.au3> #include <GUIConstantsEx.au3> $mainwindow = GUICreate("TEST", 400, 320) GUISetState(@SW_SHOW) global $arr_switch[5] = ["Item 0", "Item 1", "Item 2", "Item 3", "Item 4"] Func _AutoRefresh() _ArrayDisplay($arr_switch) EndFunc AdlibRegister("_AutoRefresh",6000) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd AdlibUnRegister("_AutoRefresh") I keep thinking best way is use consolewrite. saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
jguinch Posted October 23, 2014 Share Posted October 23, 2014 (edited) Or use put the _ArrayDisplay in the main loop : #include <Timers.au3> #include <Array.au3> #include <GUIConstantsEx.au3> $iDisplay = 0 $mainwindow = GUICreate("TEST", 400, 320) GUISetState(@SW_SHOW) global $arr_switch[5] = ["Item 0", "Item 1", "Item 2", "Item 3", "Item 4"] Func _AutoRefresh($hWnd, $Msg, $iIDTimer, $dwTime) #forceref $hWnd, $Msg, $iIDTimer, $dwTime $iDisplay = 1 EndFunc $autorefresh=_Timer_SetTimer ($mainwindow,6000,"_AutoRefresh") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch If $iDisplay Then $iDisplay = 0 _ArrayDisplay($arr_switch) EndIf WEnd Edited October 23, 2014 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
ReDFlaG Posted October 24, 2014 Author Share Posted October 24, 2014 both solution are working. thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now