Sign in to follow this  
Followers 0
Bert

WinMove problem

5 posts in this topic

I'm currently making a new flash player. I know it has been done before, but I'm attempting to make one that suit's my taste. What I'm currently attempting is to have a menu that is on the right side to be hidden or displayed by hitting a hotsetkey (F6) I can get it to hide, but when I put it back, I can't get it to size correctly. Here is the kicker - depending on what game you play, the viewer will be a different size. I'm having the size be set by simply grabbing the edge of the window and setting the size. When the viewer is either closed, or a different game loaded, the window size for the last game will be saved. I tried for several hours to get it right last night, but I couldn't get it right. HELP!

#Include <File.au3>
#include <GuiConstants.au3>
#include <GuiList.au3>
#include <Array.au3>
#include <ie.au3>
#Include <Constants.au3>
#NoTrayIcon
Opt("TrayMenuMode",1) ;for flash grabber to be added later
;Opt("MustDeclareVars", 1) ;will fix later...
Opt("TrayOnEventMode",1) ;for flash grabber to be added later
DIM $Gui_1, $List_1, $Combo_1, $Button_1
$ini_1 = IniRead(@ScriptDir&"/Bin/settings.ini", "1", "1A","nolist")
$ini_2 = IniRead(@ScriptDir&"/Bin/settings.ini", "1", "list","Show All")
if $ini_1 = "nolist" then 
    _Default_Settings_First_Run()
EndIf
$Gui_1 = GUICreate("VollyViewer 2.0", 970, 660, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, _
$WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU, $WS_CAPTION, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS))
$Combo_1 = GUICtrlCreateCombo("",766, 8,196 , 20, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST, $CBS_SORT))
$List_1 = GUICtrlCreatelist("",766, 39, 196, 580)
$Button_1 = GUICtrlCreateButton("Play Game", 880, 627, 80, 26)
$Obj = _IECreateEmbedded ()
$browser = GUICtrlCreateObj ($Obj, 8, 8, 750, 646)   ;need to fix so it will save size settings on each game. use default size on start if no save exist.

GUICtrlSetData($combo_1,IniRead(@ScriptDir&"/Bin/settings.ini", "1", "combolist","nolist"),$ini_2)
GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
GUICtrlSetResizing($Button_1, $GUI_DOCKAUTO)
GUICtrlSetResizing($Combo_1, $GUI_DOCKAUTO)
GUICtrlSetResizing($List_1, $GUI_DOCKAUTO)
_IENavigate ($Obj, 'about:blank')
$oDoc = _IEDocGetObj ($Obj)
$oDoc.body.style.overflow = "auto"
$oDoc.body.style.margin = "0px"
$oDoc.body.style.padding = "0px"
$sHTML = "<P>  Flash Viewer Area. Using the HotSetKey (F6) will hide all the"
$sHTML &="<BR> controls to the right,"
$sHTML &="and resize the GUI to just show the viewer."
$sHTML &="<P></P>"
$sHTML &="  You can size the viewer by grabbing the edge or the window<BR>"
$sHTML &="and dragging to the size you want. When you close the game<BR>"
$sHTML &="or load a new game, the window size will be saved for the<br>"
$sHTML &="next time you play the game. Enjoy!<br>"
$sHTML &="<P></P>"
$sHTML &="<P>2007 Volly Productions</P>"
_IEBodyWriteHTML ($Obj, $sHTML)
HotKeySet("{F6}", "HotKeyFunc")
HotKeySet("{ESC}", "HotKeyFunc")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $nMsg = $Combo_1
            $read_combo = GUICtrlRead($Combo_1)
            IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "list",$read_combo)
        Case $nMsg = $Button_1
            MsgBox(0,"","")
    EndSwitch
WEnd



Func HotKeyFunc()
    If WinActive($Gui_1) Then; Set the window
        Switch @HotKeyPressed
            Case "{F6}"
                local $old, $new
                ;;;have function here that either will show or hide game list.
                $z1 = ControlGetPos($Gui_1,"", 3) ;combo
                $z2 = ControlGetPos($Gui_1,"", 4) ;list
                $z3 = ControlGetPos($Gui_1,"", 5) ;play game button 
                $z4 = ControlGetPos($Gui_1,"", "[CLASS:Internet Explorer_Server; INSTANCE:1]") ;IE window
                $z5 = WinGetPos($Gui_1,"")
                ;MsgBox(0, "", $z1[2] &"   "&$z1[3]&@CRLF&$z2[2] &"   "&$z2[3]&@CRLF&$z3[2] &"   "&$z3[3]&@CRLF&$z4[2] &"   "&$z4[3])
                $getstate = GUICtrlGetState($List_1)
;~              MsgBox(0,"","window size:"&$z5[2]&@CRLF&"Viewer size: "&$z4[2]&@CRLF&"List size: "&$z2[2]&@CRLF _
;~              &"Viewer size + list size -window size: "&$z5[2]-($z4[2]+$z2[2]))
                GUICtrlSetResizing($browser, $GUI_DOCKALL)
                if $getstate = 80 Then
                    ;MsgBox(0,"",$z5[2])
                    IniWrite("info.ini", "1", "1", $z5[2])
                    GUICtrlSetState($List_1, $GUI_HIDE)
                    GUICtrlSetState($Button_1,$GUI_HIDE)
                    GUICtrlSetState($Combo_1, $GUI_HIDE)
                    WinMove($Gui_1,"", $z5[0], $z5[1],($z5[2]- $z2[2])-$z4[0])     
                    GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
                endif   
                if $getstate = 96 Then
                    $new = $z4[2]                   
                    ;MsgBox(0, "",IniRead("info.ini", "1", "1","")&"   "&$z2[2]+$z5[2])
                    GUICtrlSetState($List_1, $GUI_SHOW)
                    GUICtrlSetState($Button_1, $GUI_SHOW)
                    GUICtrlSetState($Combo_1, $GUI_SHOW)
                    WinMove($Gui_1,"", $z5[0], $z5[1], $z5[2] +$z2[2])
                    GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
                endif               
            Case "{ESC}"
                Exit
        EndSwitch
    Else
        HotKeySet(@HotKeyPressed)
        Send(@HotKeyPressed)
        HotKeySet(@HotKeyPressed, "HotKeyFunc")
    EndIf
EndFunc


func _loadlist() ;when using combo_1, it will load the correct list depending on the selection. Show all will list all files from all folders. 
 ;;;
EndFunc

func _getlist() ;old method to get list from version 1. need to fix to allow for subject folders
    $FileList = _FileListToArray (@ScriptDir & "\games\", "*.swf", 1)
    $atr = _ArrayTrim($FileList, 4, 1, 1)
    $st = _ArrayToString($atr, "|", 1)
EndFunc

func _Default_Settings_First_Run() ;remake using array when done with other stuff
DirCreate(@ScriptDir&"/Bin")
DirCreate(@ScriptDir&"/Bin/temp")
DirCreate(@ScriptDir&"/Games")
DirCreate(@ScriptDir&"/Games/Action")
DirCreate(@ScriptDir&"/Games/Sport")
DirCreate(@ScriptDir&"/Games/Adventure")
DirCreate(@ScriptDir&"/Games/Arcade")
DirCreate(@ScriptDir&"/Games/Shooting")
DirCreate(@ScriptDir&"/Games/Skill")
DirCreate(@ScriptDir&"/Games/Puzzle")
DirCreate(@ScriptDir&"/Games/Classic")
DirCreate(@ScriptDir&"/Games/Board")
DirCreate(@ScriptDir&"/Games/Fighting")
DirCreate(@ScriptDir&"/Games/Kids")
DirCreate(@ScriptDir&"/Games/Racing")
DirCreate(@ScriptDir&"/Games/Card")
DirCreate(@ScriptDir&"/Games/Casino")
DirCreate(@ScriptDir&"/Games/Multiplayer")
DirCreate(@ScriptDir&"/Games/Misc")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "combolist", "Action|Sport|Adventure|Arcade|Shooting|Show All|Skill|Puzzle|Classic|Board|Fighting|Kids|Racing|Card|Casino|Multiplayer|Misc")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "1A", "2A")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "list","Show All")
EndFunc

Share this post


Link to post
Share on other sites



Anyone care to help here????

please?:)

#Include <File.au3>
#include <GuiConstants.au3>
#include <GuiList.au3>
#include <Array.au3>
#include <ie.au3>
#Include <Constants.au3>
#NoTrayIcon
Opt("TrayMenuMode",1);for flash grabber to be added later
;Opt("MustDeclareVars", 1);will fix later...
Opt("TrayOnEventMode",1);for flash grabber to be added later
DIM $Gui_1, $List_1, $Combo_1, $Button_1
$ini_1 = IniRead(@ScriptDir&"/Bin/settings.ini", "1", "1A","nolist")
$ini_2 = IniRead(@ScriptDir&"/Bin/settings.ini", "1", "list","Show All")
if $ini_1 = "nolist" then 
    _Default_Settings_First_Run()
EndIf
$Gui_1 = GUICreate("VollyViewer 2.0", 970, 660, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, _
$WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU, $WS_CAPTION, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS))
$Combo_1 = GUICtrlCreateCombo("",766, 8,196 , 20, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST, $CBS_SORT))
$List_1 = GUICtrlCreatelist("",766, 39, 196, 580)
$Button_1 = GUICtrlCreateButton("Play Game", 880, 627, 80, 26)
$Obj = _IECreateEmbedded ()
$browser = GUICtrlCreateObj ($Obj, 8, 8, 750, 646)  ;need to fix so it will save size settings on each game. use default size on start if no save exist.
GUICtrlSetData($combo_1,IniRead(@ScriptDir&"/Bin/settings.ini", "1", "combolist","nolist"),$ini_2)
GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
GUICtrlSetResizing($Button_1, $GUI_DOCKAUTO)
GUICtrlSetResizing($Combo_1, $GUI_DOCKAUTO)
GUICtrlSetResizing($List_1, $GUI_DOCKAUTO)
_IENavigate ($Obj, 'about:blank')
$oDoc = _IEDocGetObj ($Obj)
$oDoc.body.style.overflow = "auto"
$oDoc.body.style.margin = "0px"
$oDoc.body.style.padding = "0px"
$sHTML = "<P>  Flash Viewer Area. Using the HotSetKey (F6) will hide all the"
$sHTML &="<BR> controls to the right,"
$sHTML &="and resize the GUI to just show the viewer."
$sHTML &="<P></P>"
$sHTML &="  You can size the viewer by grabbing the edge or the window<BR>"
$sHTML &="and dragging to the size you want. When you close the game<BR>"
$sHTML &="or load a new game, the window size will be saved for the<br>"
$sHTML &="next time you play the game. Enjoy!<br>"
$sHTML &="<P></P>"
$sHTML &="<P>2007 Volly Productions</P>"
_IEBodyWriteHTML ($Obj, $sHTML)
HotKeySet("{F6}", "HotKeyFunc")
HotKeySet("{ESC}", "HotKeyFunc")
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $nMsg = $Combo_1
            $read_combo = GUICtrlRead($Combo_1)
            IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "list",$read_combo)
        Case $nMsg = $Button_1
            MsgBox(0,"","")
    EndSwitch
WEnd
Func HotKeyFunc()
    If WinActive($Gui_1) Then; Set the window
        Switch @HotKeyPressed
        Case "{F6}"

                local $old, $new
               ;;;have function here that either will show or hide game list.
                $z1 = ControlGetPos($Gui_1,"", 3);combo
                $z2 = ControlGetPos($Gui_1,"", 4);list
                $z3 = ControlGetPos($Gui_1,"", 5);play game button 
                $z4 = ControlGetPos($Gui_1,"", "[CLASS:Internet Explorer_Server; INSTANCE:1]");IE window
                $z5 = WinGetPos($Gui_1,"")
               ;MsgBox(0, "", $z1[2] &"   "&$z1[3]&@CRLF&$z2[2] &"   "&$z2[3]&@CRLF&$z3[2] &"   "&$z3[3]&@CRLF&$z4[2] &"   "&$z4[3])
                $getstate = GUICtrlGetState($List_1)
;~   &"Viewer size + list size -window size: "&$z5[2]-($z4[2]+$z2[2]))
                GUICtrlSetResizing($browser, $GUI_DOCKALL)
                Select
                Case $getstate = 80
                    $canculate = ($z5[2]-($z2[0] + $z2[2]))/2
                    _FileWriteToLine("calculate.txt", 3, String($canculate), 1)
                    $canculate1_1 = ControlGetPos($Gui_1,"", 4)
                    $canculate1 = $canculate1_1[2] 
                    _FileWriteToLine("calculate.txt", 1, String($canculate1), 1)
                    IniWrite("info.ini", "1", "1", $z5[2])
                    GUICtrlSetState($List_1, $GUI_HIDE)
                    GUICtrlSetState($Button_1,$GUI_HIDE)
                    GUICtrlSetState($Combo_1, $GUI_HIDE)
                    WinMove($Gui_1,"", $z5[0], $z5[1],($z5[2]- $z2[2])-$z4[0])   
                    GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
                Case $getstate = 96
                    $new = $z4[2]   
                    $file = FileOpen("calculate.txt", 1)
                    $canculate1 = FileReadLine("calculate.txt", "1")
                    $canculate2 = FileReadLine("calculate.txt", "2")
                    $canculatex = FileReadLine("calculate.txt", "3")
                    FileClose($file)
                    GUICtrlSetState($List_1, $GUI_SHOW)
                    GUICtrlSetState($Button_1, $GUI_SHOW)
                    GUICtrlSetState($Combo_1, $GUI_SHOW)
                    $canculate1_2 = ControlGetPos($Gui_1,"", 4)
                    $canculate2 = $canculate1_2[2] 
                    _FileWriteToLine("calculate.txt", 2, String($canculate2), 1)                    
                    $canculate3 = $canculate1 - $canculate2
                    WinMove($Gui_1,"", $z5[0], $z5[1], $z5[2] +$z2[2]+$canculatex +$canculate3)
                    GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
                EndSelect     
            Case "{ESC}"
                Exit
        EndSwitch
    Else
        HotKeySet(@HotKeyPressed)
        Send(@HotKeyPressed)
        HotKeySet(@HotKeyPressed, "HotKeyFunc")
    EndIf
EndFunc
func _loadlist();when using combo_1, it will load the correct list depending on the selection. Show all will list all files from all folders. 
;;;
EndFunc

func _getlist();old method to get list from version 1. need to fix to allow for subject folders
    $FileList = _FileListToArray (@ScriptDir & "\games\", "*.swf", 1)
    $atr = _ArrayTrim($FileList, 4, 1, 1)
    $st = _ArrayToString($atr, "|", 1)
EndFunc

func _Default_Settings_First_Run();remake using array when done with other stuff
DirCreate(@ScriptDir&"/Bin")
DirCreate(@ScriptDir&"/Bin/temp")
DirCreate(@ScriptDir&"/Games")
DirCreate(@ScriptDir&"/Games/Action")
DirCreate(@ScriptDir&"/Games/Sport")
DirCreate(@ScriptDir&"/Games/Adventure")
DirCreate(@ScriptDir&"/Games/Arcade")
DirCreate(@ScriptDir&"/Games/Shooting")
DirCreate(@ScriptDir&"/Games/Skill")
DirCreate(@ScriptDir&"/Games/Puzzle")
DirCreate(@ScriptDir&"/Games/Classic")
DirCreate(@ScriptDir&"/Games/Board")
DirCreate(@ScriptDir&"/Games/Fighting")
DirCreate(@ScriptDir&"/Games/Kids")
DirCreate(@ScriptDir&"/Games/Racing")
DirCreate(@ScriptDir&"/Games/Card")
DirCreate(@ScriptDir&"/Games/Casino")
DirCreate(@ScriptDir&"/Games/Multiplayer")
DirCreate(@ScriptDir&"/Games/Misc")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "combolist", "Action|Sport|Adventure|Arcade|Shooting|Show All|Skill|Puzzle|Classic|Board|Fighting|Kids|Racing|Card|Casino|Multiplayer|Misc")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "1A", "2A")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "list","Show All")
EndFunc

so i created calculate.txt with 3 lines in it, located in script dir

this whas so hard and im so close to...

i gues tham im mising something but dono what,

so on the first list you have

766 39 196 578

when you hide it then you have its hidden location

604 39 154 578

your gui size is 970

so if 970-(766+196)=8

and if 196-154=42

then

$z5[2] +$z2[2]+42+8 = size (i hope ^^)

so im missing something becose with

Case $getstate = 80

$z5 = WinGetPos($Gui_1,"")

$z5[1] is 978 and thats strange becose your gui is set to b on the start 970 not 978

so i split the canculation with (978-(766+196))/2=8

but i still see that im missing +-1 to have it compleet :/

this whas hard any other sugestions anyone?


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You are running into what I ran into last night. I don't know how to calculate the size of the window. We need someone who is real good with math.

ummm...Gary..Jos, either of you out there?

#Include <File.au3>
#include <GuiConstants.au3>
#include <GuiList.au3>
#include <Array.au3>
#include <ie.au3>
#Include <Constants.au3>
#NoTrayIcon
Opt("TrayMenuMode",1);for flash grabber to be added later
;Opt("MustDeclareVars", 1);will fix later...
Opt("TrayOnEventMode",1);for flash grabber to be added later
DIM $Gui_1, $List_1, $Combo_1, $Button_1
$ini_1 = IniRead(@ScriptDir&"/Bin/settings.ini", "1", "1A","nolist")
$ini_2 = IniRead(@ScriptDir&"/Bin/settings.ini", "1", "list","Show All")
if $ini_1 = "nolist" then 
    _Default_Settings_First_Run()
EndIf
$Gui_1 = GUICreate("VollyViewer 2.0", 970, 660, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, _
$WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU, $WS_CAPTION, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS))
$Combo_1 = GUICtrlCreateCombo("",766, 8,196 , 20, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST, $CBS_SORT))
$List_1 = GUICtrlCreatelist("",766, 39, 196, 580)
$Button_1 = GUICtrlCreateButton("Play Game", 880, 627, 80, 26)
$Obj = _IECreateEmbedded ()
$browser = GUICtrlCreateObj ($Obj, 8, 8, 750, 646);need to fix so it will save size settings on each game. use default size on start if no save exist.
GUICtrlSetData($combo_1,IniRead(@ScriptDir&"/Bin/settings.ini", "1", "combolist","nolist"),$ini_2)
GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
GUICtrlSetResizing($Button_1, $GUI_DOCKAUTO)
GUICtrlSetResizing($Combo_1, $GUI_DOCKAUTO)
GUICtrlSetResizing($List_1, $GUI_DOCKAUTO)
_IENavigate ($Obj, 'about:blank')
$oDoc = _IEDocGetObj ($Obj)
$oDoc.body.style.overflow = "auto"
$oDoc.body.style.margin = "0px"
$oDoc.body.style.padding = "0px"
$sHTML = "<P>  Flash Viewer Area. Using the HotSetKey (F6) will hide all the"
$sHTML &="<BR> controls to the right,"
$sHTML &="and resize the GUI to just show the viewer."
$sHTML &="<P></P>"
$sHTML &="  You can size the viewer by grabbing the edge or the window<BR>"
$sHTML &="and dragging to the size you want. When you close the game<BR>"
$sHTML &="or load a new game, the window size will be saved for the<br>"
$sHTML &="next time you play the game. Enjoy!<br>"
$sHTML &="<P></P>"
$sHTML &="<P>2007 Volly Productions</P>"
_IEBodyWriteHTML ($Obj, $sHTML)
HotKeySet("{F6}", "HotKeyFunc")
HotKeySet("{ESC}", "HotKeyFunc")
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $nMsg = $Combo_1
            $read_combo = GUICtrlRead($Combo_1)
            IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "list",$read_combo)
        Case $nMsg = $Button_1
            MsgBox(0,"","")
    EndSwitch
WEnd
Func HotKeyFunc()
    If WinActive($Gui_1) Then; Set the window
        Switch @HotKeyPressed
        Case "{F6}"

                local $old, $new
            ;;;have function here that either will show or hide game list.
                $z1 = ControlGetPos($Gui_1,"", 3);combo
                $z2 = ControlGetPos($Gui_1,"", 4);list
                $z3 = ControlGetPos($Gui_1,"", 5);play game button 
                $z4 = ControlGetPos($Gui_1,"", "[CLASS:Internet Explorer_Server; INSTANCE:1]");IE window
                $z5 = WinGetPos($Gui_1,"")
            ;MsgBox(0, "", $z1[2] &"   "&$z1[3]&@CRLF&$z2[2] &"   "&$z2[3]&@CRLF&$z3[2] &"   "&$z3[3]&@CRLF&$z4[2] &"   "&$z4[3])
                $getstate = GUICtrlGetState($List_1)
;~   &"Viewer size + list size -window size: "&$z5[2]-($z4[2]+$z2[2]))
                GUICtrlSetResizing($browser, $GUI_DOCKALL)
                Select
                Case $getstate = 80
                    $canculate = ($z5[2]-($z2[0] + $z2[2]))-8
                    _FileWriteToLine("calculate.txt", 3, String("8"), 1)
                    $canculate1_1 = ControlGetPos($Gui_1,"", 4)
                    $canculate1 = $canculate1_1[2] 
                    _FileWriteToLine("calculate.txt", 1, String($canculate1), 1)
                    IniWrite("info.ini", "1", "1", $z5[2])
                    GUICtrlSetState($List_1, $GUI_HIDE)
                    GUICtrlSetState($Button_1,$GUI_HIDE)
                    GUICtrlSetState($Combo_1, $GUI_HIDE)
                    WinMove($Gui_1,"", $z5[0], $z5[1],($z5[2]- $z2[2])-8)    
                    GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
                Case $getstate = 96
                    $new = $z4[2]   
                    $file = FileOpen("calculate.txt", 1)
                    $canculate1 = FileReadLine("calculate.txt", "1")
                    $canculate2 = FileReadLine("calculate.txt", "2")
                    $canculatex = FileReadLine("calculate.txt", "3")
                    FileClose($file)
                    GUICtrlSetState($List_1, $GUI_SHOW)
                    GUICtrlSetState($Button_1, $GUI_SHOW)
                    GUICtrlSetState($Combo_1, $GUI_SHOW)
                    $canculate1_2 = ControlGetPos($Gui_1,"", 4)
                    $canculate2 = $canculate1_2[2] 
                    $z2 = ControlGetPos($Gui_1,"", 4);list
                    $z5 = WinGetPos($Gui_1,"")
                    _FileWriteToLine("calculate.txt", 2, String($canculate2), 1)                    
                    $canculate3 = $canculate1 - $canculate2
                    WinMove($Gui_1,"", $z5[0], $z5[1], $z5[2] +$z2[2]+$canculatex +$canculate3)
                    GUICtrlSetResizing($browser, $GUI_DOCKAUTO)
                EndSelect     
            Case "{ESC}"
                Exit
        EndSwitch
    Else
        HotKeySet(@HotKeyPressed)
        Send(@HotKeyPressed)
        HotKeySet(@HotKeyPressed, "HotKeyFunc")
    EndIf
EndFunc
func _loadlist();when using combo_1, it will load the correct list depending on the selection. Show all will list all files from all folders. 
;;;
EndFunc

func _getlist();old method to get list from version 1. need to fix to allow for subject folders
    $FileList = _FileListToArray (@ScriptDir & "\games\", "*.swf", 1)
    $atr = _ArrayTrim($FileList, 4, 1, 1)
    $st = _ArrayToString($atr, "|", 1)
EndFunc

func _Default_Settings_First_Run();remake using array when done with other stuff
DirCreate(@ScriptDir&"/Bin")
DirCreate(@ScriptDir&"/Bin/temp")
DirCreate(@ScriptDir&"/Games")
DirCreate(@ScriptDir&"/Games/Action")
DirCreate(@ScriptDir&"/Games/Sport")
DirCreate(@ScriptDir&"/Games/Adventure")
DirCreate(@ScriptDir&"/Games/Arcade")
DirCreate(@ScriptDir&"/Games/Shooting")
DirCreate(@ScriptDir&"/Games/Skill")
DirCreate(@ScriptDir&"/Games/Puzzle")
DirCreate(@ScriptDir&"/Games/Classic")
DirCreate(@ScriptDir&"/Games/Board")
DirCreate(@ScriptDir&"/Games/Fighting")
DirCreate(@ScriptDir&"/Games/Kids")
DirCreate(@ScriptDir&"/Games/Racing")
DirCreate(@ScriptDir&"/Games/Card")
DirCreate(@ScriptDir&"/Games/Casino")
DirCreate(@ScriptDir&"/Games/Multiplayer")
DirCreate(@ScriptDir&"/Games/Misc")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "combolist", "Action|Sport|Adventure|Arcade|Shooting|Show All|Skill|Puzzle|Classic|Board|Fighting|Kids|Racing|Card|Casino|Multiplayer|Misc")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "1A", "2A")
IniWrite(@ScriptDir&"/Bin/settings.ini", "1", "list","Show All")
EndFunc

pls test this code, dont forget to add txt file calculate.txt with 3 lines in it (in dir where script is)

Edited with: and dont forget pls to telme does this edit in script works 4 you ^^

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

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