Sign in to follow this  
Followers 0
realkiller

Helup

9 posts in this topic

the picture that is chekking of a window is opend is fucked up.

isnt there a way to hold it steady, the picture must change if the window is open and if the window is closed it must turn back

; Author:         Robert Hertzer

 
 
;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< login 24 Help tool >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Local $Password = "timmy"
Do
$sPass = InputBox("Security Check", "Enter your password:", "", "*")
If $sPass = $Password Then
MsgBox(0, "Access Granted", "Thank you, you have logged in successfully.", 1)
Else
MsgBox(0, "Access Denied", "Sorry, you did not enter the correct password." & @CRLF & "Try Again.")
EndIf
Until $sPass = $Password
;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< login 24 Help tool >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 

 ;=================================================================================================================>_ChangeScreenRes===============================
#include-once
Func _ChangeScreenRes($i_Width = @DesktopWidth, $i_Height = @DesktopHeight, $i_BitsPP = @DesktopDepth, $i_RefreshRate = @DesktopRefresh)
 Local Const $DM_PELSWIDTH = 0x00080000
 Local Const $DM_PELSHEIGHT = 0x00100000
 Local Const $DM_BITSPERPEL = 0x00040000
 Local Const $DM_DISPLAYFREQUENCY = 0x00400000
 Local Const $CDS_TEST = 0x00000002
 Local Const $CDS_UPDATEREGISTRY = 0x00000001
 Local Const $DISP_CHANGE_RESTART = 1
 Local Const $DISP_CHANGE_SUCCESSFUL = 0
 Local Const $HWND_BROADCAST = 0xffff
 Local Const $WM_DISPLAYCHANGE = 0x007E
 If $i_Width = "" Or $i_Width = -1 Then $i_Width = @DesktopWidth
 If $i_Height = "" Or $i_Height = -1 Then $i_Height = @DesktopHeight
 If $i_BitsPP = "" Or $i_BitsPP = -1 Then $i_BitsPP = @DesktopDepth
 If $i_RefreshRate = "" Or $i_RefreshRate = -1 Then $i_RefreshRate = @DesktopRefresh 
 Local $DEVMODE = DllStructCreate("byte[32];int[10];byte[32];int[6]")
 Local $B = DllCall("user32.dll", "int", "EnumDisplaySettings", "ptr", 0, "long", 0, "ptr", DllStructGetPtr($DEVMODE))
 If @error Then
  $B = 0
  SetError(1)
  Return $B
 Else
  $B = $B[0]
 EndIf
 If $B <> 0 Then
  DllStructSetData($DEVMODE, 2, BitOR($DM_PELSWIDTH, $DM_PELSHEIGHT, $DM_BITSPERPEL, $DM_DISPLAYFREQUENCY), 5)
  DllStructSetData($DEVMODE, 4, $i_Width, 2)
  DllStructSetData($DEVMODE, 4, $i_Height, 3)
  DllStructSetData($DEVMODE, 4, $i_BitsPP, 1)
  DllStructSetData($DEVMODE, 4, $i_RefreshRate, 5)
  $B = DllCall("user32.dll", "int", "ChangeDisplaySettings", "ptr", DllStructGetPtr($DEVMODE), "int", $CDS_TEST)
  If @error Then
   $B = -1
  Else
   $B = $B[0]
  EndIf
  Select
   Case $B = $DISP_CHANGE_RESTART
    $DEVMODE = ""
    Return 2
   Case $B = $DISP_CHANGE_SUCCESSFUL
    DllCall("user32.dll", "int", "ChangeDisplaySettings", "ptr", DllStructGetPtr($DEVMODE), "int", $CDS_UPDATEREGISTRY)
    DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND_BROADCAST, "int", $WM_DISPLAYCHANGE, _
      "int", $i_BitsPP, "int", $i_Height * 2 ^ 16 + $i_Width)
    $DEVMODE = ""
    Return 1
   Case Else
    $DEVMODE = ""
    SetError(1)
    Return $B
  EndSelect
 EndIf
EndFunc
 ;=================================================================================================================>_ChangeScreenRes size
$iWidth = 1280
$iHeight = 1024
$iBitsPP = 32
$iRefreshRate = 60
 ;=================================================================================================================>_ChangeScreenRes size
$vRes = _ChangeScreenRes($iWidth, $iHeight, $iBitsPP, $iRefreshRate)
If @error Then
    MsgBox(262160, "ERROR", "Unable to change screen - check parameters")
EndIf
 ;=================================================================================================================>_ChangeScreenRes===============================
 
 
 
 
 
 
 
 

 ;_-----------------------------------------------------------------------------
 $Password = "password.txt"
 $ISISusername = FileReadLine($Password, 2)
 $ISISPassword = FileReadLine($Password, 4)
 $Rollercoasterusername = FileReadLine($Password, 8)
 $RollercoasterPassword = FileReadLine($Password, 10)
 $SupportCenterusername = FileReadLine($Password, 14)
 $SupportCenterPassword = FileReadLine($Password, 16)
 $CSpireusername = FileReadLine($Password, 20)
 $CSpirePassword = FileReadLine($Password, 22)
 $Avayausername = FileReadLine($Password, 26)
 $AvayaPassword = FileReadLine($Password, 28)
 $Clairifyusername = FileReadLine($Password, 32)
 $ClairifyPassword = FileReadLine($Password, 34)
 $LotusPassword = FileReadLine($Password, 38)
 $Citrixusername = FileReadLine($Password, 42)
 $CitrixPassword = FileReadLine($Password, 44)
#include <GUIConstants.au3>
#include <IE.au3>
Opt("WinTitleMatchMode", 2)
Opt("SendKeyDelay",0)
Opt("SendKeyDownDelay",0)
GUICreate("24 Help V1.2", 956, 35, 0,0, $WS_POPUPWINDOW, $WS_EX_TOPMOST)
GUICtrlCreatePic("background.jpg", 0,0,956, 35, "",$WS_EX_TOPMOST) 
GUICtrlSetState(-1,$GUI_DISABLE)
GUISetHelp("notepad")
$ISIS = GUICtrlCreateButton("ISIS", 22, 5, 85, 25, 0)
$SupportCenter = GUICtrlCreateButton("SupportCenter", 244, 5, 95, 25, 0)
$Rollercoaster = GUICtrlCreateButton("Rollercoaster",128, 5, 95, 25, 0)
$CSpire = GUICtrlCreateButton("C-Spire", 361, 5, 85, 25, 0)
GUICtrlCreateDate(@YEAR & "/" & @MON & "/" & @MDAY, 449, 5, 185)
$Avaya = GUICtrlCreateButton("Avaya", 658, 5, 85, 25, 0)
$Clairify = GUICtrlCreateButton("Clairify", 765, 5, 85, 25, 0)
$Lotus = GUICtrlCreateButton("Lotus", 871, 5, 85, 25, 0)

$Pic1 = GUICtrlCreatePic(@ScriptDir & "\Grijs.gif", 0, 0, 21, 35)
$Pic2 = GUICtrlCreatePic(@ScriptDir & "\Grijs.gif", 107, 0, 21, 35)
$Pic3 = GUICtrlCreatePic(@ScriptDir & "\Grijs.gif", 223, 0, 21, 35)
$Pic4 = GUICtrlCreatePic(@ScriptDir & "\Grijs.gif", 339, 0, 21, 35)
$Pic5 = GUICtrlCreatePic(@ScriptDir & "\Grijs.gif", 636, 0, 21, 35)
$Pic6 = GUICtrlCreatePic(@ScriptDir & "\Grijs.gif", 744, 0, 21, 35)
$Pic7 = GUICtrlCreatePic(@ScriptDir & "\Grijs.gif", 850, 0, 21, 35)
GUISetState(@SW_SHOW)
While 1
If WinExists("Abandon") Then
WinActivate("Abandon")
Send("{TAB}")
send("{DOWN}")
Send("{TAB 2}")
send("{ENTER}")
EndIf
If WinExists("MetaFrame Presentation Server Logged Off") Then
WinClose("MetaFrame Presentation Server Logged Off")
EndIf
If WinExists("Support Center login") Then
WinActivate("Support Center login")
Send("{TAB}")
send($SupportCenterusername)
Send("{TAB}")
Send($SupportCenterPassword)
Send("{ENTER}")
$x = StatusbarGetText("Support Center login")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("Support Center login")
WEnd
WinMove("SupportSoft Support Center Web", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic3,@ScriptDir & "\Blauw.gif")
EndIf
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    
 
 
Case $ISIS
If WinExists("ISIS") Then
WinMove("ISIS - Interregionaal Storingen Informatie Systeem", "", 0, 36, 956, 829)
WinActivate("ISIS")
GUICtrlSetImage($Pic1,@ScriptDir & "\Blauw.gif")
Else
Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://isis.yi.org/")
WinWaitActive("Connect to isis.yi.org")
ControlSend("", "", "Edit2", $ISISusername)
ControlSend("", "", "Edit3", $ISISPassword)
ControlClick("", "", "Button2")
WinWaitActive("ISIS - Interregionaal Storingen Informatie Systeem")
WinMove("ISIS - Interregionaal Storingen Informatie Systeem", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic1,@ScriptDir & "\Blauw.gif")
EndIF
            

Case $Rollercoaster
If WinExists("Rollercoaster") Then
GUICtrlSetImage($Pic2,@ScriptDir & "\Blauw.gif")
WinActivate("Rollercoaster")
WinMove("Rollercoaster", "", 0, 36, 956, 829)
Else
Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://sddportal.yi.org/tools/rollercoaster/main.html")
WinWaitActive("Connect to sddportal.yi.org")
ControlSend("", "", "Edit2", $Rollercoasterusername)
ControlSend("", "", "Edit3", $RollercoasterPassword)
ControlClick("", "", "Button2")
WinwaitActive("Rollercoaster")
WinMove("Rollercoaster", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic2,@ScriptDir & "\Blauw.gif")
EndIf
 
Case $SupportCenter
If WinExists("SupportSoft Support Center Web") Then
WinMove("SupportSoft Support Center Web", "", 0, 36, 956, 829)
WinActivate("SupportSoft Support Center Web")
GUICtrlSetImage($Pic3,@ScriptDir & "\Blauw.gif")
Else
Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://scaprd.upc.biz/sdchealtop")
$x = StatusbarGetText("Support Center login")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("Support Center login")
WEnd
send($SupportCenterusername)
Send("{TAB}")
Send($SupportCenterPassword)
Send("{ENTER}")
$x = StatusbarGetText("SupportSoft Support Center Web")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("SupportSoft Support Center Web")
WEnd
WinMove("SupportSoft Support Center Web", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic3,@ScriptDir & "\Blauw.gif")
EndIf
          
            
            
Case $CSpire
If WinExists("UPC Web Access - Welcome") Then
WinClose("UPC Web Access - Welcome")
EndIf
If WinExists("MetaFrame Presentation Server Logged Off") Then
WinClose("MetaFrame Presentation Server Logged Off")
EndIf

$ie = _IECreate("https://iapp.upc.biz/Citrix/UPCApplications/auth/login.aspx")
$x = StatusbarGetText("UPC Web Access Login")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("UPC Web Access Login")
WEnd
Send($Citrixusername)
send("{TAB}")
Send($CitrixPassword)
Send("{TAB}")
Send("{DOWN}")
Send("{TAB 2}")
Send("{ENTER}")
$x = StatusbarGetText("UPC Web Access - Welcome")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("UPC Web Access - Welcome")
WEnd
Sleep("1000")
_IENavigate($ie, "https://iapp.upc.biz/Citrix/UPCApplications/site/launch.ica?NFuse_Application=Citrix.MPS.App.NLCF103.Internet+Explorer&NFuse_AppFriendlyNameURLENcoded=Internet+Explorer")
WinWaitActive("Code of conduct,E-Mail usage and Internet policy.")
WinActivate("Code of conduct,E-Mail usage and Internet policy.")
Send("{ENTER}")
_IENavigate($ie, "https://iapp.upc.biz/Citrix/UPCApplications/site/logout.aspx")
WinWaitActive("Liberty Global Inc.")
Send("{TAB}")
Send("http://ghd.upc.nl/bb/login.jsp", 1)
WinWaitActive("Client File Security")
ControlClick("", "", "Button11")
Send("{ENTER}")
WinWaitActive("Login")
Send($CSpireusername)
Send("{TAB}")
Send($CSpirePassword)
Send("{ENTER}")
GUICtrlSetImage($Pic4,@ScriptDir & "\Blauw.gif")

 

Case $Avaya
WinSetTitle("Right_Frame", "", "Avaya Agent") 
If WinExists("UPC Web Access - Welcome") Then
WinClose("UPC Web Access - Welcome")
EndIf
If WinExists("MetaFrame Presentation Server Logged Off") Then
WinClose("MetaFrame Presentation Server Logged Off")
EndIf
If WinExists("Avaya Agent") Then
WinActivate("Avaya Agent")
GUICtrlSetImage($Pic5,@ScriptDir & "\Blauw.gif")
Else
$drapkop = _IECreate("https://iapp.upc.biz/Citrix/UPCApplications/auth/login.aspx")
$x = StatusbarGetText("UPC Web Access Login")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("UPC Web Access Login")
WEnd
Send($Citrixusername)
send("{TAB}")
Send($CitrixPassword)
Send("{TAB}")
Send("{DOWN}")
Send("{TAB 2}")
Send("{ENTER}")
$x = StatusbarGetText("UPC Web Access - Welcome")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("UPC Web Access - Welcome")
WEnd
Sleep("1000")
_IENavigate($drapkop, "https://iapp.upc.biz/Citrix/UPCApplications/site/launch.ica?NFuse_Application=Citrix.MPS.App.NLCF102.Avaya+613&NFuse_AppFriendlyNameURLENcoded=Avaya+613")
WinWaitActive("Code of conduct,E-Mail usage and Internet policy.")
Send("{ENTER}")
WinWaitActive("Avaya Agent Login")
Send($Avayausername)
Send("{TAB}")
Send($AvayaPassword)
Send("{ENTER}")
_IENavigate($drapkop, "https://iapp.upc.biz/Citrix/UPCApplications/site/logout.aspx")
GUICtrlSetImage($Pic5,@ScriptDir & "\Blauw.gif")
EndIF
            
            
            
Case $Clairify
If WinExists("UPC Web Access - Welcome") Then
WinClose("UPC Web Access - Welcome")
EndIf
If WinExists("MetaFrame Presentation Server Logged Off") Then
WinClose("MetaFrame Presentation Server Logged Off")
EndIf

If WinExists("Clarify") Then
WinSetState("Clarify - ClearCallCenter", "",@SW_RESTORE)
WinActivate("Clarify")
WinMove("Clarify", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic6,@ScriptDir & "\Blauw.gif")
Else
$inet = _IECreate("https://iapp.upc.biz/Citrix/UPCApplications/auth/login.aspx")
$x = StatusbarGetText("UPC Web Access Login")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("UPC Web Access Login")
WEnd
Send($Citrixusername)
send("{TAB}")
Send($CitrixPassword)
Send("{TAB}")
Send("{DOWN}")
Send("{TAB 2}")
Send("{ENTER}")
$x = StatusbarGetText("UPC Web Access - Welcome")
While Not StringInStr($x, "Done")
Sleep(100)
$x = StatusbarGetText("UPC Web Access - Welcome")
WEnd
Sleep("1000")
_IENavigate($inet, "https://iapp.upc.biz/Citrix/UPCApplications/site/launch.ica?NFuse_Application=Citrix.MPS.App.NLCF102.Clarify+249+CLARNL+3T+Twenty4Help&NFuse_AppFriendlyNameURLENcoded=Clarify+249+CLARNL+3T+Twenty4Help")
WinWaitActive("Code of conduct,E-Mail usage and Internet policy.")
Send("{ENTER}")
WinWaitActive("Clarify Login")
Send($ClairifyPassword)
Send("{TAB 5}")
Send($Clairifyusername)
Send("{ENTER}")
_IENavigate($inet, "https://iapp.upc.biz/Citrix/UPCApplications/site/logout.aspx")
GUICtrlSetImage($Pic6,@ScriptDir & "\Blauw.gif")
EndIf                 
 
Case $Lotus
If WinExists("Logout Screen") Then
WinActivate("Logout Screen")
sleep("1000")
Send("{ENTER}")
sleep("1000")
send($LotusPassword&"{ENTER}")
AutoItSetOption("WinTitleMatchMode", 2)
winWaitActive("IBM Lotus Notes")
WinMove("IBM Lotus Notes", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic7,@ScriptDir & "\Blauw.gif")
EndIf
If ProcessExists("nlnotes.exe") Then
AutoItSetOption("WinTitleMatchMode", 2)
WinActivate("IBM Lotus Notes")
WinMove("IBM Lotus Notes", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic7,@ScriptDir & "\Blauw.gif")
Else
run("C:\lotus\notes\notes.exe =N:\notes.ini")
WinWaitActive("Lotus Notes")
sleep("1000")
send($LotusPassword&"{ENTER}")
AutoItSetOption("WinTitleMatchMode", 2)
WinWaitActive("IBM Lotus Notes")
WinMove("IBM Lotus Notes", "", 0, 36, 956, 829)
EndIf
GUICtrlSetImage($Pic7,@ScriptDir & "\Blauw.gif")
   
EndSwitch

 
If Not WinExists("ISIS") Then GUICtrlSetImage($Pic1,@ScriptDir & "\Grijs.gif")
If Not WinExists("Rollercoaster") Then GUICtrlSetImage($Pic2,@ScriptDir & "\Grijs.gif")
If Not WinExists("SupportSoft Support Center Web") Then GUICtrlSetImage($Pic3,@ScriptDir & "\Grijs.gif")
If Not WinExists("") Then GUICtrlSetImage($Pic4,@ScriptDir & "\Grijs.gif")
If Not WinExists("Right_Frame") Then GUICtrlSetImage($Pic5,@ScriptDir & "\Grijs.gif")
If Not WinExists("Clarify") Then GUICtrlSetImage($Pic6,@ScriptDir & "\Grijs.gif")
If Not ProcessExists("nlnotes.exe") Then GUICtrlSetImage($Pic7,@ScriptDir & "\Grijs.gif")

WEnd

post-8019-1164717091_thumb.jpg

Share this post


Link to post
Share on other sites



Request is mangled and hard to understand. The expectations are unreasonable. The code is too broad and doesn't help understand the request. And you have been a member for over a year and should know better...

Lar.

Ditto!... well said Larry

... and remember you at least have the attention of someone who knows DLL Calls

give him what he wants and he CAN help you

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

i made a gui in. in that gui u can press buttons that opens a window, if the window isnt open you see Grijs.gif and if it is open Blauw.gif and if the window is closed it should turn back to Grijs.gif.

now i use a loop to see if the window is there or not, that is not the problem but the problem is flickering images is there a way to prevent this

Share this post


Link to post
Share on other sites

Just load all the pics, and use ControlShow()/ControlHide() on the ones that you want to be visible on start up and when you need to show one... you controlshow that one, and controlhide the other.... just make you a small udf to do it... I've used this method myself.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

thx for helping, i lookedup in the helpfile but doesnt make any sense can you make a little example

What did you look up?

Open Notepad and run this example, minimize and activate to see the effect.

Global $nPic
$Main = GUICreate('Some GUI', 956, 35, -1, -1, 0x80000000, 0x00000008)
$Bkgnd = GUICtrlCreatePic(@DesktopDir & '\background.jpg', 0, 0, 956, 35)
GUICtrlSetState($Bkgnd, 128)
$Pic1 = GUICtrlCreatePic(@DesktopDir & '\1.gif', 0, 0, 21, 35)
$Pic2 = GUICtrlCreatePic(@DesktopDir & '\2.gif', 107, 0, 21, 35)
ControlHide(HWnd($Main), '', $Pic2)
GUISetState()
While 1
    Switch GUIGetMsg()
        Case $Pic1, $Pic2
            Exit -1
    EndSwitch
    If WinActive('Untitled - Notepad') And Not $nPic Then _HideShow($Main, $Pic1, $Pic2)
    If Not WinActive('Untitled - Notepad') And $nPic Then _HideShow($Main, $Pic2, $Pic1)
WEnd
Func _HideShow($hWnd, $aCID1, $aCID2)
    $nPic = Not $nPic
    ControlHide(HWnd($hWnd), '', $aCID1)
    ControlShow(HWnd($hWnd), '', $aCID2)
EndFunc
Notice the 20 lines of code that Larry mentioned as an example.

Edit:

I had your pics on my desktop if you didn't notice... change those to wherever yours are.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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