Jump to content
Sign in to follow this  
Generator

Script won't work

Recommended Posts

Generator

#region Includes
#include<GUIConstants.au3>
#include<GUIList.au3>
#NoTrayIcon
#endregion Includes
#region Declares
Opt("GUIOnEventMode",1)
Global $WinGetState
$HideIt=False
$HotKeyToggleHide=False
$OnTopValue=False
#endregion Decalres
#region GUICreation
$mainfrm=GUICreate("Hider Pro","200","350",-1,-1)
$menufile=GUICtrlCreateMenu("File")
$menufileitem=GUICtrlCreateMenuitem("Exit",$menufile)
$menutrans=GUICtrlCreateMenu("Trans Set")
$menutransitem1=GUICtrlCreateMenuItem("75% Transparent",$menutrans)
$menutransitem2=GUICtrlCreateMenuItem("50% Transparent",$menutrans)
$menutransitem3=GUICtrlCreateMenuItem("25% Transparent",$menutrans)
$menutransitem4=GUICtrlCreateMenuItem("Restore Transparent",$menutrans)
$menuopt=GUICtrlCreateMenu("Options")
$menuoptitem=GUICtrlCreateMenuitem("Toggle Hide",$menuopt)
$menuoptitem1=GUICtrlCreateMenuItem("Help",$menuopt)
$labelprocess=GUICtrlCreateLabel("Process Name",5,2,80,20,$SS_CENTER)
$labelstate=GUICtrlCreateLabel("State",110,2,70,20,$SS_CENTER)
$listpro=GUICtrlCreateList("",2,22,90,200,$LBS_SORT+$WS_VSCROLL+$WS_BORDER )
$vislabel=GUICtrlCreateLabel("Unknown State",100,25,90,60,$SS_CENTER)
$checkbutton=GUICtrlCreateButton("Check State",100,80,95,30,$BS_CENTER+$BS_VCENTER)
$refreshbutton=GUICtrLCreateButton("Refresh List",100,115,95,30,$BS_CENTER+$BS_VCENTER)
$setrealbutton=GUICtrlCreateButton("Set Real Win",100,150,95,30,$BS_CENTER+$BS_VCENTER)
$setfakebutton=GUICtrlCreateButton("Set Fake Win",100,185,95,30,$BS_CENTER+$BS_VCENTER)
$HotkeyEnDis=GUICtrlCreateButton("Enable Hide Hotkey",2,225,196,30,$BS_CENTER+$BS_VCENTER)
$Restoreal=GUICtrlCreateButton("Restore All Hideen Windows",2,260,196,30,$BS_CENTER+$BS_VCENTER)
$SetOnTop=GUICtrlCreateButton("Set On Top",2,295,95,30,$BS_CENTER+$BS_VCENTER)
$ExitButton=GUICtrlCreateButton("Exit",105,295,93,30,$BS_CENTER+$BS_VCENTER)
GUISetState(@SW_SHOW)
#endregion GUICreation
#region GUIEvents
GUISetOnEvent($GUI_EVENT_CLOSE,"Quit")
GUICtrlSetOnEvent($refreshbutton,"Refresh")
GUICtrlSetOnEvent($menufileitem,"Quit")
GUICtrlSetOnEvent($menutransitem1,"Trans1")
GUICtrlSetOnEvent($menutransitem2,"Trans2")
GUICtrlSetOnEvent($menutransitem3,"Trans3")
GUICtrlSetOnEvent($menutransitem4,"Trans4")
GUICtrlSetOnEvent($menuoptitem,"ToggleHide")
GUICtrlSetOnEvent($SetOnTop,"SetTop")
GUICtrlSetOnEvent($checkbutton,"CheckState")
GUICtrlSetFont($labelprocess,12,400,0,"Tahoma")
GUICtrlSetFont($labelstate,12,400,0,"Tahoma")
GUICtrlSetFont($vislabel,12,400,0,"Tahoma")
#Endregion GUIEvents
While 1
    Sleep(1000)
WEnd
#region Functions
Func Refresh()
    $list=ProcessList()
    For $i = 1 to $list[0][0]
        GUICtrlSetData($listpro,$list[$i][0])
    Next
EndFunc
Func Quit()
    Exit
EndFunc
Func Trans1()
    WinSetTrans("Hider Pro","",192)
EndFunc
Func Trans2()
    WinSetTrans("Hider Pro","",128)
EndFunc
Func Trans3()
    WinSetTrans("Hider Pro","",64)
EndFunc
Func Trans4()
    WinSetTrans("Hider Pro","",255)
EndFunc
Func ToggleHide()
    $HotKeyToggleHide=NOT $HotKeyToggleHide
    If $HotKeyToggleHide=True Then
        HotKeySet("{F9}","HideIt")
    Else
        HotKeySet("{F9}")
    EndIf
EndFunc
Func HideIt()
    $HideIt=NOT $HideIt
    If $HideIt=True Then
        WinSetState("Hider Pro","",@SW_HIDE)
    Else
        WinSetState("Hider Pro","",@SW_SHOW)
    EndIf
EndFunc
Func SetTop()
    $OnTopValue=Not $OnTopValue
    If $OnTopValue=True Then
        GUICtrlSetData($SetOnTop,"Cancel On Top")
        WinSetOnTop("Hider Pro","",1)
    Else
        GUICtrlSetData($SetOnTop,"Set On Top")
        WinSetOnTop("Hider Pro","",0)
    EndIf
EndFunc
Func CheckState()
    $ProcessName=GUICtrlRead($listpro)
    $Checkpro=ProcessExists($ProcessName)
    If $Checkpro=0 Then
        MsgBox(64,"Process do not Exists","Please Refresh the List")
    Else
        ProcessGetWindow($Checkpro)
    EndIf
    Select
        Case BitAnd($WinGetState,1)
            GUICtrlSetData($vislabel,"Windows Exists")
        Case BitAnd($WinGetState,2)
            GUICtrlSetData($vislabel,"Windows is Visible")
        Case BitAnd($WinGetState,4)
            GUICtrlSetData($vislabel,"Windows is Enabled")
        Case BitAnd($WinGetState,8)
            GUICtrlSetData($vislabel,"Windows is Active")
        Case BitAnd($WinGetState,16)
            GUICtrlSetData($vislabel,"Windows is Minimized")
        Case BitAnd($WinGetState,32)
            GUICtrlSetData($vislabel,"Windows is Maximized")
    EndSelect
EndFunc
Func ProcessGetWindow($Checkpro)
    Local $WinList = WinList()
    Local $i = 1
    Local $WindowTitle = ""
    While $i <= $WinList[0][0] And $WindowTitle = ""
        If WinGetProcess($WinList[$i][0], "") = $Checkpro Then
                $WindowTitle = $WinList[$i][0]
        Else
            $i = $i + 1
        EndIf
    WEnd
    Return $WindowTitle
    ReTurn $WinGetState=WinGetState($WindowTitle)
EndFunc
#endregion Functions

The CheckState button doesn't work properly.

Any idea on fixing my script?

I know my coding is crappy yeh.

Thanks in Advance.

:shocked:

Edited by Generator

Share this post


Link to post
Share on other sites
Valuater

Maybe...

Func CheckState()
    $ProcessName=GUICtrlRead($listpro)
    $Checkpro=ProcessExists($ProcessName)
    ;MsgBox(0, $Checkpro, $ProcessName)
    If $Checkpro=0 Then
        MsgBox(64,"Process do not Exists","Please Refresh the List")
    Else
        $WinState = ProcessGetWindow($Checkpro)
    EndIf
    Select
        Case BitAnd($WinState,1)
            GUICtrlSetData($vislabel,"Windows Exists")
        Case BitAnd($WinState,2)
            GUICtrlSetData($vislabel,"Windows is Visible")
        Case BitAnd($WinState,4)
            GUICtrlSetData($vislabel,"Windows is Enabled")
        Case BitAnd($WinState,8)
            GUICtrlSetData($vislabel,"Windows is Active")
        Case BitAnd($WinState,16)
            GUICtrlSetData($vislabel,"Windows is Minimized")
        Case BitAnd($WinState,32)
            GUICtrlSetData($vislabel,"Windows is Maximized")
    EndSelect
    
    ;MsgBox(0,0, $WinState)
EndFunc
Func ProcessGetWindow($Checkpro)
    Local $WinList = WinList()
    Local $i = 1
    Local $WindowTitle = ""
    While $i <= $WinList[0][0] And $WindowTitle = ""
        If WinGetProcess($WinList[$i][0], "") = $Checkpro Then
                $WindowTitle = $WinList[$i][0]
        Else
            $i = $i + 1
        EndIf
    WEnd
    ;MsgBox(0,0, $WindowTitle)
    $WinGetState=WinGetState($WindowTitle)
    ;Return $WindowTitle
    ReTurn $WinGetState
EndFunc

*** tested *************

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Valuater

Bump

:shocked:

10 Minute bumps are only for paying customers

If I would have seen that before i found your problem, I would not have posted the help

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
Generator

#region Includes
#include<GUIConstants.au3>
#include<GUIList.au3>
#NoTrayIcon
#endregion Includes
#region Declares
Opt("GUIOnEventMode",1)
Global $WinGetState, $TimeInit
$HideIt=False
$HotKeyToggleHide=False
$OnTopValue=False
#endregion Decalres
#region GUICreation
$mainfrm=GUICreate("Hider Pro","200","350",-1,-1)
$menufile=GUICtrlCreateMenu("File")
$menufileitem=GUICtrlCreateMenuitem("Exit",$menufile)
$menutrans=GUICtrlCreateMenu("Trans Set")
$menutransitem1=GUICtrlCreateMenuItem("75% Transparent",$menutrans)
$menutransitem2=GUICtrlCreateMenuItem("50% Transparent",$menutrans)
$menutransitem3=GUICtrlCreateMenuItem("25% Transparent",$menutrans)
$menutransitem4=GUICtrlCreateMenuItem("Restore Transparent",$menutrans)
$menuopt=GUICtrlCreateMenu("Options")
$menuoptitem=GUICtrlCreateMenuitem("Toggle Hide",$menuopt)
$menuoptitem1=GUICtrlCreateMenuItem("Help",$menuopt)
$labelprocess=GUICtrlCreateLabel("Process Name",5,2,80,20,$SS_CENTER)
$labelstate=GUICtrlCreateLabel("State",110,2,70,20,$SS_CENTER)
$listpro=GUICtrlCreateList("",2,22,90,200,$LBS_SORT+$WS_VSCROLL+$WS_BORDER )
$vislabel=GUICtrlCreateLabel("Unknown State",100,25,90,60,$SS_CENTER)
$checkbutton=GUICtrlCreateButton("Check State",100,80,95,30,$BS_CENTER+$BS_VCENTER)
$refreshbutton=GUICtrLCreateButton("Refresh List",100,115,95,30,$BS_CENTER+$BS_VCENTER)
$setrealbutton=GUICtrlCreateButton("Set Real Win",100,150,95,30,$BS_CENTER+$BS_VCENTER)
$setfakebutton=GUICtrlCreateButton("Set Fake Win",100,185,95,30,$BS_CENTER+$BS_VCENTER)
$HotkeyEnDis=GUICtrlCreateButton("Enable Hide Hotkey",2,225,196,30,$BS_CENTER+$BS_VCENTER)
$Restoreal=GUICtrlCreateButton("Restore All Hideen Windows",2,260,196,30,$BS_CENTER+$BS_VCENTER)
$SetOnTop=GUICtrlCreateButton("Set On Top",2,295,95,30,$BS_CENTER+$BS_VCENTER)
$ExitButton=GUICtrlCreateButton("Exit",105,295,93,30,$BS_CENTER+$BS_VCENTER)
GUISetState(@SW_SHOW)
#endregion GUICreation
#region GUIEvents
GUISetOnEvent($GUI_EVENT_CLOSE,"Quit")
GUICtrlSetOnEvent($refreshbutton,"Refresh")
GUICtrlSetOnEvent($menufileitem,"Quit")
GUICtrlSetOnEvent($menutransitem1,"Trans1")
GUICtrlSetOnEvent($menutransitem2,"Trans2")
GUICtrlSetOnEvent($menutransitem3,"Trans3")
GUICtrlSetOnEvent($menutransitem4,"Trans4")
GUICtrlSetOnEvent($menuoptitem,"ToggleHide")
GUICtrlSetOnEvent($SetOnTop,"SetTop")
GUICtrlSetOnEvent($checkbutton,"CheckState")
GUICtrlSetFont($labelprocess,12,400,0,"Tahoma")
GUICtrlSetFont($labelstate,12,400,0,"Tahoma")
GUICtrlSetFont($vislabel,12,400,0,"Tahoma")
#Endregion GUIEvents
While 1
    Sleep(1000)
WEnd
#region Functions
Func Refresh()
    $list=ProcessList()
    For $i = 1 to $list[0][0]
        GUICtrlSetData($listpro,$list[$i][0])
    Next
EndFunc
Func Quit()
    Exit
EndFunc
Func Trans1()
    WinSetTrans("Hider Pro","",192)
EndFunc
Func Trans2()
    WinSetTrans("Hider Pro","",128)
EndFunc
Func Trans3()
    WinSetTrans("Hider Pro","",64)
EndFunc
Func Trans4()
    WinSetTrans("Hider Pro","",255)
EndFunc
Func ToggleHide()
    $HotKeyToggleHide=NOT $HotKeyToggleHide
    If $HotKeyToggleHide=True Then
        HotKeySet("{F9}","HideIt")
    Else
        HotKeySet("{F9}")
    EndIf
EndFunc
Func HideIt()
    $HideIt=NOT $HideIt
    If $HideIt=True Then
        WinSetState("Hider Pro","",@SW_HIDE)
    Else
        WinSetState("Hider Pro","",@SW_SHOW)
    EndIf
EndFunc
Func SetTop()
    $OnTopValue=Not $OnTopValue
    If $OnTopValue=True Then
        GUICtrlSetData($SetOnTop,"Cancel On Top")
        WinSetOnTop("Hider Pro","",1)
    Else
        GUICtrlSetData($SetOnTop,"Set On Top")
        WinSetOnTop("Hider Pro","",0)
    EndIf
EndFunc
Func CheckState()
    GUICtrlSetData($vislabel,"Please Wait")
    $TimeInit=TimerInit()
    $ProcessName=GUICtrlRead($listpro)
    $Checkpro=ProcessExists($ProcessName)
    If $Checkpro=0 Then
        MsgBox(64,"Process do not Exists","Please Refresh the List")
    Else
        $WinGetState=ProcessGetWindow($Checkpro)
    EndIf
    GUICtrlSetData($vislabel,$WinGetState)
    If BitAnd($WinGetState,1) Then GUICtrlSetData($vislabel,"Windows Exists")
    If BitAnd($WinGetState,2) Then GUICtrlSetData($vislabel,"Windows is Visible")
    If BitAnd($WinGetState,4) Then GUICtrlSetData($vislabel,"Windows is Enabled")
    If BitAnd($WinGetState,8) Then GUICtrlSetData($vislabel,"Windows is Active")
    If BitAnd($WinGetState,16) Then GUICtrlSetData($vislabel,"Windows is Minimized")
    If BitAnd($WinGetState,32) Then GUICtrlSetData($vislabel,"Windows is Maximized")
    If $WinGetState=0 Then GUICtrlSetData($vislabel,"Unknown State")
    If $WinGetState=-1 Then GUICtrlSetData($vislabel,"Checking Timed Out")
EndFunc
Func ProcessGetWindow($Checkpro)
    $WinGetState=0
    Local $WinList = WinList()
    Local $i = 1
    Local $WindowTitle = ""
    While $i <= $WinList[0][0] And $WindowTitle = ""
        If WinGetProcess($WinList[$i][0], "") = $Checkpro Then
                $WindowTitle = $WinList[$i][0]
        Else
            $i = $i + 1
        EndIf
        If TimerDiff($TimeInit)>10000 Then Return -1
    WEnd
    ReTurn $WinGetState=WinGetState($WindowTitle)
EndFunc
#endregion Functions

I can't seem to get the Window State. By the way how can I get the active Windows Title.

For Example:

I opened IE 7, I want to get it's title. How?

A program have many windows =O.

Anyways thanks for helping.

:shocked:

Share this post


Link to post
Share on other sites
PsaltyDS

I can't seem to get the Window State. By the way how can I get the active Windows Title.

For Example:

I opened IE 7, I want to get it's title. How?

A program have many windows =O.

Anyways thanks for helping.

:shocked:

To get the window's state, use WinGetState(). A title of "" gives the current active window.

To get the active window title, use WinGetTitle().

If you have multiple windows that might match, use window handles instead with WinGetHandle(), and WinList().

Spend some time in the help file and you will have no problem.

:(

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Generator

#region Includes
#include<GUIConstants.au3>
#include<GUIList.au3>
#NoTrayIcon
#endregion Includes
#region Declares
Opt("GUIOnEventMode",1)
Global $RealTitle=""
Global $RealText=""
Global $FakeTitle=""
Global $FakeText=""
$HideIt=False
$HotKeyToggleHide=False
$OnTopValue=False
$EnableHotkey=False
$Hide=False
#endregion Decalres
#region GUICreation
$mainfrm=GUICreate("Hider Pro","200","350",-1,-1)
$menufile=GUICtrlCreateMenu("File")
$menufileitem=GUICtrlCreateMenuitem("Exit",$menufile)
$menutrans=GUICtrlCreateMenu("Trans")
$menutransitem1=GUICtrlCreateMenuItem("75% Transparent",$menutrans)
$menutransitem2=GUICtrlCreateMenuItem("50% Transparent",$menutrans)
$menutransitem3=GUICtrlCreateMenuItem("25% Transparent",$menutrans)
$menutransitem4=GUICtrlCreateMenuItem("Restore Transparent",$menutrans)
$menuopt=GUICtrlCreateMenu("Options")
$menuoptitem=GUICtrlCreateMenuitem("Toggle Hide",$menuopt)
$menuoptitem1=GUICtrlCreateMenuItem("Help",$menuopt)
$aboutmenu=GUICtrlCreateMenu("About")
$aboutmenuitem1=GUICtrlCreateMenuItem("Version",$aboutmenu)
$labelprocess=GUICtrlCreateLabel("Process Name",5,2,80,20,$SS_CENTER)
$labelstate=GUICtrlCreateLabel("State",110,2,70,20,$SS_CENTER)
$listpro=GUICtrlCreateList("",2,22,90,200,$LBS_SORT+$WS_VSCROLL+$WS_BORDER )
$vislabel=GUICtrlCreateLabel("Unknown State",100,25,90,60,$SS_CENTER)
$killbutton=GUICtrlCreateButton("Kill Process",100,80,95,30,$BS_CENTER+$BS_VCENTER)
$refreshbutton=GUICtrLCreateButton("Refresh List",100,115,95,30,$BS_CENTER+$BS_VCENTER)
$setrealbutton=GUICtrlCreateButton("Set Real Win",100,150,95,30,$BS_CENTER+$BS_VCENTER)
$setfakebutton=GUICtrlCreateButton("Set Fake Win",100,185,95,30,$BS_CENTER+$BS_VCENTER)
$HotkeyEnDis=GUICtrlCreateButton("Enable Hide Hotkey",2,225,196,30,$BS_CENTER+$BS_VCENTER)
$Restoreall=GUICtrlCreateButton("Restore All Hideen Windows",2,260,196,30,$BS_CENTER+$BS_VCENTER)
$SetOnTop=GUICtrlCreateButton("Set On Top",2,295,95,30,$BS_CENTER+$BS_VCENTER)
$ExitButton=GUICtrlCreateButton("Exit",105,295,93,30,$BS_CENTER+$BS_VCENTER)
GUISetState(@SW_SHOW)
#endregion GUICreation
#region GUIEvents
GUISetOnEvent($GUI_EVENT_CLOSE,"Quit")
GUICtrlSetOnEvent($refreshbutton,"Refresh")
GUICtrlSetOnEvent($menufileitem,"Quit")
GUICtrlSetOnEvent($menutransitem1,"Trans1")
GUICtrlSetOnEvent($menutransitem2,"Trans2")
GUICtrlSetOnEvent($menutransitem3,"Trans3")
GUICtrlSetOnEvent($menutransitem4,"Trans4")
GUICtrlSetOnEvent($menuoptitem,"ToggleHide")
GUICtrlSetOnEvent($setrealbutton,"SetRealWin")
GUICtrlSetOnEvent($setfakebutton,"SetFakeWin")
GUICtrlSetOnEvent($SetOnTop,"SetTop")
GUICtrlSetOnEvent($killbutton,"KillProcess")
GUICtrlSetOnEvent($HotkeyEnDis,"HotKeyEnDis")
GUICtrlSetOnEvent($ExitButton,"QuitRestore")
GUICtrlSetOnEvent($menufileitem,"QuitRestore")
GUICtrlSetOnEvent($Restoreall,"Restoreall")
GUICtrlSetOnEvent($menuoptitem1,"Help")
GUICtrlSetOnEvent($aboutmenuitem1,"About")
GUICtrlSetFont($labelprocess,12,400,0,"Tahoma")
GUICtrlSetFont($labelstate,12,400,0,"Tahoma")
GUICtrlSetFont($vislabel,11,400,0,"Tahoma")
#Endregion GUIEvents
While 1
    Sleep(1000)
WEnd
#region Functions
Func Refresh()
    $list=ProcessList()
    For $i = 1 to $list[0][0]
        GUICtrlSetData($listpro,$list[$i][0])
    Next
EndFunc
Func Quit()
    Exit
EndFunc
Func Trans1()
    WinSetTrans("Hider Pro","",192)
EndFunc
Func Trans2()
    WinSetTrans("Hider Pro","",128)
EndFunc
Func Trans3()
    WinSetTrans("Hider Pro","",64)
EndFunc
Func Trans4()
    WinSetTrans("Hider Pro","",255)
EndFunc
Func ToggleHide()
    $HotKeyToggleHide=NOT $HotKeyToggleHide
    If $HotKeyToggleHide=True Then
        HotKeySet("{F9}","HideIt")
    Else
        HotKeySet("{F9}")
    EndIf
EndFunc
Func HideIt()
    $HideIt=NOT $HideIt
    If $HideIt=True Then
        WinSetState("Hider Pro","",@SW_HIDE)
    Else
        WinSetState("Hider Pro","",@SW_SHOW)
    EndIf
EndFunc
Func SetTop()
    $OnTopValue=Not $OnTopValue
    If $OnTopValue=True Then
        GUICtrlSetData($SetOnTop,"Cancel On Top")
        WinSetOnTop("Hider Pro","",1)
    Else
        GUICtrlSetData($SetOnTop,"Set On Top")
        WinSetOnTop("Hider Pro","",0)
    EndIf
EndFunc
Func KillProcess()
    $Pid=GUICtrlRead($listpro)
    $Process=ProcessExists($Pid)
    If $Process=0 Then
        MsgBox(64,"Process not Exist","Please Refresh List")
        Return
    Else
        $Warnmsg= MsgBox (4 + 48, "Warning", "Are you sure you want to close this process? Doing so may cause system unstability and unwanted data loss! Continue?")
        If $Warnmsg= 6 Then
            ProcessClose($Process)
        Else
            Return
        EndIf
    EndIf
EndFunc
Func SetRealWin()
    Local $InputRealTitle=""
    Local $RealTitle=""
    Local $RealText=""
    $InputRealTitle=InputBox("Real Windows Title","Please Input Exact Real Windows Title as Shown","Example: Internet Explorer","",400,50)
    If @Error=1 Then
        Return
    EndIf
    $WinRealExist=WinExists($InputRealTitle)
    If $WinRealExist=0 Then
        MsgBox(64,"Windows not Exist","Please ReEnter the Full Title")
        Return
    Else
        $RealTitle=WinGetTitle($InputRealTitle)
        $RealText=WinGetText($InputRealTitle)
        MsgBox(64,"Real Windows Is","Title:"&$RealTitle&@CRLF&"Text:"&$RealText)
        Return $RealTitle And $RealText
    EndIf        
EndFunc
Func SetFakeWin()
    Local $InputFakeTitle=""
    Local $FakeTitle=""
    Local $FakeText=""
    $InputFakeTitle=InputBox("Fake Windows Title","Please Input Exact Fake Windows Title as Shown","Example: Internet Explorer","",400,50)
    If @Error=1 Then
        Return
    EndIf
    $WinFakeExist=WinExists($InputFakeTitle)
    If $WinFakeExist=0 Then
        MsgBox(64,"Windows not Exist","Please ReEnter the Full Title")
        Return
    Else
        $FakeTitle=WinGetTitle($InputFakeTitle)
        $FakeText=WinGetText($InputFakeTitle)
        MsgBox(64,"Real Windows Is","Title:"&$FakeTitle&@CRLF&"Text:"&$FakeText)
        Return $FakeTitle And $FakeText
    EndIf        
EndFunc
Func HotKeyEnDis()
    $EnableHotkey=Not $EnableHotkey
    If $EnableHotkey=True Then
        GUICtrlSetData($HotkeyEnDis,"Disable Hide Hotkey")
        HotKeySet("{F10}","Hide")
    Else
        GUICtrlSetData($HotkeyEnDis,"Enable Hide Hotkey")
        HotKeySet("{F10}")
    EndIf
EndFunc
Func Hide()
    $CheckRealExist=WinExists($RealTitle,$RealText)
    $CheckFakeExist=WinExists($FakeTitle,$FakeText)
    If $CheckRealExist=0 Or $CheckFakeExist=0 Then
        MsgBox(64,"Windows Error","Please Reset Real and Fake Window")
        Return
    EndIf
    $Hide=Not $Hide
    If $Hide=True Then
        WinSetState($RealTitle,$RealText,@SW_HIDE)
        WinSetState($FakeTitle,$FakeText,@SW_SHOW)
        GUICtrlSetData($vislabel,"Real Window Hideen,Fake Shown")
    Else
        WinSetState($RealTitle,$RealText,@SW_SHOW)
        WinSetState($FakeTitle,$FakeText,@SW_HIDE)
        GUICtrlSetData($vislabel,"Fake Window Hideen,Real Shown")
    EndIf
EndFunc
Func QuitRestore()
    WinSetState($RealTitle,$RealText,@SW_SHOW)
    WinSetState($FakeTitle,$FakeText,@SW_SHOW)
    Exit
EndFunc
Func RestoreAll()
    WinSetState($RealTitle,$RealText,@SW_SHOW)
    WinSetState($FakeTitle,$FakeText,@SW_SHOW)
    GUICtrLSetData($vislabel,"All Hideen Windows Restored")
EndFunc
Func Help()
    MsgBox(64,"Instruction","Steps:"&@CRLF&"1.Set Real Windows"&@CRLF&"2.Set Fake Windows"&@CRLF&"3.Enable Hide Hotkey, Hotkey is F10"&@CRLF&"4.Hit F10, Real Window Hides, Fake Windows Show up.Read State"&@CRLF& _
    "Extras:"&@CRLF&"Toggle Hide to Enable Hide Hotkey for Hider Pro, Hotkey is F9"&@CRLF&"Task Manager works like normal one")
EndFunc
Func About()
    MsgBox(64,"About","Hider Pro v.10 Beta")
EndFunc
#endregion Functions

Any idea why Set Real and Fake Window won't work properly? Maybe point me out?

Thanks in advance.

:shocked:

Edited by Generator

Share this post


Link to post
Share on other sites
Generator

What was the purpose of this script?

:shocked:

It hides windows by using
WinSetState
, more likely those Anti-Boss program out there. But the problem is I can't seem to set the Real window and the fake window(You will see once you run the full script). When you press the hokey real window hides fake 1 show up(Explained in help menu).

Anyways I can't seem to able to set the fake window.

Anyone can help?

Thanks in advance.

:(

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.