Jump to content

helllp me


Recommended Posts

i got a script but sometimes the programmes hangs with a command.

is there a way if a command isnt responding 30sec that it must go back to the gui sow i cant continu selecting other buttons

;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 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 = 75
;================================================================================================
=================>_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)
 $Aspectuname = FileReadLine($Password, 47)
 $AspectWW = FileReadLine($Password, 49)
 
#include <GUIConstants.au3>
#include <IE.au3>
Opt("WinTitleMatchMode", 2)
Opt("SendKeyDelay",0)
Opt("SendKeyDownDelay",0)
GUICreate("24 Help V2.0 Final", 1063, 35, 0,0, $WS_POPUPWINDOW, $WS_EX_TOPMOST)
GUICtrlCreatePic("background.jpg", 0,0,1063, 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)
$Aspect = GUICtrlCreateButton("Aspect", 978, 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)
$Pic8 = GUICtrlCreatePic(@ScriptDir & "\Grijs.gif", 957, 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("Login", "http://goe-aspectns-01.corp.twenty4help.com/EAMWeb/EWFM/ENU/Common/servlet/login.xml?ReturnUrl=%2fEAMWeb%2fEWFM%2fENU%2fAPI%2fservlet%2fAdminGetUserProfile.ewfm") Then
WinActivate("Login", "http://goe-aspectns-01.corp.twenty4help.com/EAMWeb/EWFM/ENU/Common/servlet/login.xml?ReturnUrl=%2fEAMWeb%2fEWFM%2fENU%2fAPI%2fservlet%2fAdminGetUserProfile.ewfm")
$222x = StatusbarGetText("Login")
While Not StringInStr ($222x,  "Done")
Sleep (100)
$222x = StatusbarGetText("Login")
WEnd
send($Aspectuname)
send("{TAB}")
send($AspectWW)
Send("{ENTER}")
$22233x = StatusbarGetText("Aspect Applications")
While Not StringInStr ($22233x,  "Done")
Sleep (100)
$22233x = StatusbarGetText("Aspect Applications")
WEnd
WinMove("Aspect Applications", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic8,@ScriptDir & "\Blauw.gif")
EndIf
If WinExists("Support Center login") Then
WinActivate("Support Center login")
send($SupportCenterusername)
Send("{TAB}")
Send($SupportCenterPassword)
Send("{ENTER}")
sleep("2000")
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")
WinMove ( "Connect to sddportal.yi.org", "", 9999, 9999)
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("Login") Then
WinActivate("Login")
Send($CSpireusername)
send("{TAB}")
Send($CSpirePassword)
send("{ENTER}")
EndIf
If WinExists("BBP") Then
WinMove("BBP", "", 0, 36, 956, 829)
WinActivate("BBP")
GUICtrlSetImage($Pic4,@ScriptDir & "\Blauw.gif")
Else
WinSetState("Clarify - ClearCallCenter", "",@SW_RESTORE)
WinActivate("Clarify")
WinMove("Clarify", "", 0, 36, 956, 829)
WinWaitActive("Clarify")
MouseClick("left", 1006, 702, 1, 1)
WinWaitActive("Knowledgebase v2.0")
WinActivate("Knowledgebase v2.0")
Send("{TAB 3}")
send("http://ghd.upc.nl/bb/login.jsp")
Send("{ENTER}")
WinWaitActive("Login")
Send($CSpireusername)
Send("{TAB}")
Send($CSpirePassword)
Send("{ENTER}")
WinWaitActive("BBP")
WinMove("BBP", "", 0, 36, 956, 829)
GUICtrlSetImage($Pic4,@ScriptDir & "\Blauw.gif")
EndIf
 
 

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
$avv1 = WinSetState("Avaya Agent", "", @SW_RESTORE)
$avv2 = WinActivate("Avaya Agent", "")
ConsoleWrite($avv1 & @LF & $avv2)
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 - ClearCallCenter", "") Then
$ret1 = WinSetState("Clarify - ClearCallCenter", "", @SW_RESTORE)
$ret2 = WinActivate("Clarify - ClearCallCenter", "")
ConsoleWrite($ret1 & @LF & $ret2)
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")

Case $Aspect
If WinExists("Aspect Applications") Then
WinMove("Aspect Applications", "", 0, 36, 956, 829)
WinActivate("Aspect Applications")
GUICtrlSetImage($Pic8,@ScriptDir & "\Blauw.gif")
Else
Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://goe-aspectns-01.corp.twenty4help.com/EAMWeb")
EndIF
 
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("BBP") Then GUICtrlSetImage($Pic4,@ScriptDir & "\Grijs.gif")
If Not WinExists("Avaya Agent") 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")
If Not WinExists("Aspect Applications") Then GUICtrlSetImage($Pic8,@ScriptDir & "\Grijs.gif")

WEnd
Link to comment
Share on other sites

  • Moderators

Here are a few pointer for getting help on this forum.

  • Give a short but descriptive title to your topic ("helllp me" doesn't meet that criteria).
  • Give a good description of your problem and what your are trying to accomplish.
  • Provide as minimal code as possible that can be used to reproduce the problem.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...