Kiti Posted January 1, 2010 Share Posted January 1, 2010 Hello! I want to move the window resulted from arraydisplay function but it won't move by any means. #include <array.au3> global $array[10] _arraydisplay($array,"ARRAYTITLE") winmove("ARRAYTITLE","",100,100) What can I do? Thank you in advance! Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 1, 2010 Moderators Share Posted January 1, 2010 Kiti,The _ArrayDisplay GUI is a blocking function like MsgBox, meaning your script is paused until it is closed. So you can never move it because by the time you try to move it, it no longer exists!You will have to write your own GUI if you want to move it about, sorry. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Kiti Posted January 1, 2010 Author Share Posted January 1, 2010 Oh, I see. I will create a GUI then. Thank you very much for your help! Happy New Year! Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
martin Posted January 1, 2010 Share Posted January 1, 2010 (edited) Hello! I want to move the window resulted from arraydisplay function but it won't move by any means. #include <array.au3> global $array[10] _arraydisplay($array,"ARRAYTITLE") winmove("ARRAYTITLE","",100,100) What can I do? The window is displayed for the array and the function _arraydisplay does not return untill the window is closed, so of course you cannot move it like that. An easy way to do it is like this, but there is a delay before it is moved. #include <array.au3> #include <timers.au3> Global $array[10] $timer1 = _Timer_SetTimer(0, 20, "shift") _ArrayDisplay($array, "ARRAYTITLE") Func shift($a,$b,$c,$d);parameters are unused but must be included If Not WinExists("ARRAYTITLE") Then Return WinMove("ARRAYTITLE", "", 100, 100) _Timer_KillTimer(0, $timer1) EndFunc ;==>shift Thank you in advance! Edit: Would have been more sensible if I'd used AdlibRegister instead of using a timer but it still does the job. Edited January 1, 2010 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 1, 2010 Moderators Share Posted January 1, 2010 martin, Nice lateral thinking! Happy New Year! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Kiti Posted January 1, 2010 Author Share Posted January 1, 2010 That's exactly what I needed, thank you very much! Happy New Year! Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Kiti Posted January 1, 2010 Author Share Posted January 1, 2010 I've integrated it into my script but I don't know why it's not resizing... :-/ expandcollapse popup#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include<array.au3> #include <timers.au3> Opt("MustdeclareVars", 1) Opt("GUIOnEventMode", 1) Global $Form1, $Edit1, $Edit2, $Button1 Global $ET, $LS, $LR, $TE, $NS, $TM, $TM_0, $TM_1, $TM_2, $TM_3 Global $raport1, $striped1, $slot[2] Global $v1[10], $v2[10], $v3[10], $v4[10], $array3[11][4] Global $p, $x, $s, $i1, $i2, $i3, $timer1, $a, $b, $c, $d $array3[0][0] = "Temp. max" $array3[0][1] = "Reactor" $array3[0][2] = "Energie/sat" $array3[0][3] = "Ofiter" $Form1 = GUICreate("Form1", 462, 200, 219, 126) GUISetOnEvent($GUI_event_close, "Form1Close") $Edit1 = GUICtrlCreateEdit("", 66, 37, 104, 121) $Button1 = GUICtrlCreateButton("Button1", 198, 124, 75, 25, 0) GUICtrlSetOnEvent($Button1, "Button1") GUISetState(@SW_SHOW) button1() ;~ While 1 ;~ Sleep(100) ;~ WEnd Func Form1Close() Exit 0 EndFunc ;==>Form1Close Func Button1() $raport1 = GUICtrlRead($Edit1) $striped1 = StringStripWS($raport1, 8) $ET = StringRegExp($striped1, '(?:Energie:)([0-9.]{1,7})', 1) $LS = StringRegExp($striped1, '(?:UzinaSolara)([0-9]{1,2})', 1) $LR = StringRegExp($striped1, '(?:ReactordeFuziune)([0-9]{1,2})', 1) $TE = StringRegExp($striped1, '(?:TehnologiaEnergiei)([0-9]{1,2})', 1) $NS = StringRegExp($striped1, '(?:Satelitsolar)([0-9.]{1,6})', 1) $slot = StringRegExp($striped1, "((?:\[\d:\d{1,3}:)(\d{1,2})(?:\]))", 1) If Not IsArray($ET) Then $ET = 0 Else $ET = Int(StringReplace($ET[0], ".", "")) EndIf If Not IsArray($LS) Then $LS = 0 Else $LS = Int($LS[0]) EndIf If Not IsArray($LR) Then $LR = 0 Else $LR = Int($LR[0]) EndIf If Not IsArray($TE) Then $TE = 0 Else $TE = Int($TE[0]) EndIf If Not IsArray($NS) Then $NS = 0 Else $NS = Int(StringReplace($NS[0], ".", "")) EndIf If Not IsArray($slot) Then $slot = 0 Else $slot = $slot[1] EndIf #cs $ET = 4567 $LS = 20 $LR = 0 $TE = 12 $NS = 23 $p = 1 #ce ;~ #cs $ET = 20030 $LS = 23 $LR = 0 $TE = 0 $NS = 442 $p = 1 $slot = 7 ;~ #ce If $LR = 0 Then TM(0) Else TM(1) EndIf For $i = 1 To $i2 - 1 $array3[$i][0] = $v1[$i] $array3[$i][1] = $v2[$i] $array3[$i][2] = $v3[$i] $array3[$i][3] = $v4[$i] Next _ArraySort($array3, 1, 1, $i2 - 1) ;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- $timer1 = _Timer_SetTimer(0, 20, "shift") _ArrayDisplay($array3, "Slot " & $slot, $i2 - 1) ;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GUICtrlSetData($Edit1, "") ResetArrays() EndFunc ;==>Button1 Func ResetArrays() $v1 = 0 $v2 = 0 $v3 = 0 $v4 = 0 $p = 1 $i2 = 1 $array3 = 0 Global $v1[10], $v2[10], $v3[10], $v4[10], $array3[11][4] $array3[0][0] = "Temp. max" $array3[0][1] = "Reactor" $array3[0][2] = "Energie/sat" $array3[0][3] = "Ofiter" EndFunc ;==>ResetArrays Func TM($r) If $r = 0 Then $TM_0 = 4 * ((($ET - Int(20 * $LS * 1.1 ^ $LS)) / $NS) - 20) $TM_1 = 4 * Ceiling(((($ET - 20 * $LS * 1.1 ^ ($LS + 1)) / $NS) - 22) / 1.1) If IsInt($TM_0) Then $v1[$i2] = $TM_0 $v2[$i2] = "-" $v3[$i2] = ($TM_0 / 4) + 20 $v4[$i2] = "OFF" $i2 = $i2 + 1 EndIf If IsInt($TM_1) Then $v1[$i2] = $TM_1 $v2[$i2] = "-" $v3[$i2] = ($TM_1 / 4) + 20 $v4[$i2] = "ON" $i2 = $i2 EndIf EndIf If $r = 1 Then For $i1 = 0 To 10 $TM_2 = ((4 * ($ET - Int(20 * $LS * 1.1 ^ $LS) - Int($p * 30 * $LR * (1.05 + $TE * 0.01) ^ $LR))) / $NS) - 80 $TM_3 = 4 * ((Ceiling($ET / 1.1) - Int(20 * $LS * 1.1 ^ $LS) - Int($p * 30 * $LR * (1.05 + $TE * 0.01) ^ $LR))) / $NS - 80 If IsInt($TM_2) And $TM_2 < 129 And $TM_2 > -128 Then If $i1 = 10 Then $p = 0 $v1[$i2] = $TM_2 $v2[$i2] = $p * 100 & "%" $v3[$i2] = Int($TM_2 / 4) + 20 $v4[$i2] = "OFF" $i2 = $i2 + 1 EndIf If Not StringInStr($TM_3, ".") And $TM_3 < 129 And $TM_3 > -128 Then $v1[$i2] = $TM_3 $v2[$i2] = $p * 100 & "%" $v3[$i2] = Int($TM_3 / 4) + 20 $v4[$i2] = "ON" $i2 = $i2 + 1 EndIf $p = $p - 0.1 Next EndIf EndFunc ;==>TM Func shift($a,$b,$c,$d);parameters are unused but must be included If Not WinExists("ARRAYTITLE") Then Return WinMove("Slot " & $slot, "", default,default,default,75 + 21 * $i2) _Timer_KillTimer(0, $timer1) EndFunc ;==>shift Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
martin Posted January 1, 2010 Share Posted January 1, 2010 (edited) I've integrated it into my script but I don't know why it's not resizing... :-/ Func shift($a,$b,$c,$d);parameters are unused but must be included If Not WinExists("ARRAYTITLE") Then Return;<------------------------------------------because of this? WinMove("Slot " & $slot, "", default,default,default,75 + 21 * $i2) _Timer_KillTimer(0, $timer1) EndFunc ;==>shift Edited January 1, 2010 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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