Jump to content
Sign in to follow this  
Bert

SciTe flipping out on script

Recommended Posts

Bert

I'm stumped and I have no idea why this is happening. I've tried to cut out just about everything on this script to make it as vanilla as possible in troubleshooting it, but I do not see what the problem is. For some reason, (and only this script is causing it) when I

  • run it from Scite
  • while running the script, I go to click on a command in the script
  • press F1
The script will try to rerun itself about 6 times. It makes no sence. I do notice the alt key is acting like it is in the down position, but I do not see any reason why.

#include <GUIConstants.au3>
#include <IE.au3>
#Include <Constants.au3>
Opt("TrayIconDebug", 1)

_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
;$oIE2 = _IECreateEmbedded()
$w = @DesktopWidth
$h = @DesktopHeight
$h1 = $h - 150
$w1 = $w - 40
$w2 = $w - 60
$h2 = $h - 25
Dim $ininame, $IniButtonNames, $iniweb, $inioptions_Enable, $inioptions_apps, $x, $oIE1, $oIE2 ;$WS_OVERLAPPEDWINDOW , $WS_VISIBLE , $WS_CLIPSIBLINGS
_inisettings()
$title = $ininame[1][1]
$gui = GUICreate($title, $w1, $h1, -1, -1 ,BitOR ($WS_SIZEBOX, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))   ;())
;main pane
$label1 = GUICtrlCreateLabel("", 10, 68, $w - 60, $h - 230)
GUICtrlSetBkColor(-1, 0xff0000)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetState(-1, $GUI_HIDE)
;marquee pane

$label2 = GUICtrlCreateLabel("", 10, 40, $w1 - 20, 23)
GUICtrlSetBkColor(-1, $GUI_DISABLE)
GUICtrlSetState(-1, $GUI_HIDE)

;~ $oIE1 = _IECreate("about:blank", 0, 0) ; creates an invisible instance of a regular browser window
;~ $oIE1.AddressBar = 0 ; turn off all four IE Bars - works on 3rd party bars too, mostly.
;~ $oIE1.MenuBar = 0
;~ $oIE1.StatusBar = 0
;~ $oIE1.ToolBar = 0
;~ $uID1 = Random(1000, 100000000) ; give it a unique name so we can grab the correct handle and process ID
;~ $oIE1.document.title = $uID1
;~ WinWait($uID1)
;~ $hoIE1 = WinGetHandle($uID1)
;~ $mainwwindow = WinGetHandle($title)
;~ $pid1 = WinGetProcess($hoIE1)
;~ DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hoIE1, "int", -16, "long", $WS_CHILD)
;~ DllCall("user32.dll", "int", "SetParent", "hwnd", $hoIE1, "hwnd", $gui)

;~ $oIE2 = _IECreate("about:blank", 0, 0)
;~ $oIE2.AddressBar = 0
;~ $oIE2.MenuBar = 0
;~ $oIE2.StatusBar = 0
;~ $oIE2.ToolBar = 0
;~ $uID2 = Random(1000, 100000000)
;~ $oIE2.document.title = $uID2
;~ WinWait($uID2)
;~ $hoIE2 = WinGetHandle($uID2)
;~ $pid2 = WinGetProcess($hoIE2)
;~ DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hoIE2, "int", -16, "long", $WS_CHILD)
;~ DllCall("user32.dll", "int", "SetParent", "hwnd", $hoIE2, "hwnd", $gui)

;~ repositionIEs()

$GUI_Button_CTS_web = GUICtrlCreateButton($IniButtonNames[1][1], 10, 5, 70, 30)
GUICtrlSetResizing($GUI_Button_CTS_web, 8)
;GUICtrlSetBkColor($GUI_Button_CTS_web,0xffeeee)  ; Green
$GUI_Button_Depot_web = GUICtrlCreateButton($IniButtonNames[2][1], 85, 5, 80, 30)
GUICtrlSetResizing($GUI_Button_Depot_web, 8)
;GUICtrlSetBkColor($GUI_Button_Depot_web,0xdddddd)
$GUI_Button_SC_web = GUICtrlCreateButton($IniButtonNames[3][1], 170, 5, 80, 30)
GUICtrlSetResizing($GUI_Button_SC_web, 8)
;GUICtrlSetBkColor($GUI_Button_SC_web,0xddccbb)
$GUI_Button_problem_board = GUICtrlCreateButton($IniButtonNames[4][1], 255, 5, 100, 30)
GUICtrlSetResizing($GUI_Button_problem_board, 8)
;GUICtrlSetBkColor($GUI_Button_problem_board,0x886655)
$GUI_Button_Service_request = GUICtrlCreateButton($IniButtonNames[5][1], 360, 5, 90, 30)
GUICtrlSetResizing($GUI_Button_Service_request, 8)

$GUI_Button_Field_operations = GUICtrlCreateButton($IniButtonNames[7][1], 595 - 140, 5, 90, 30)
GUICtrlSetResizing($GUI_Button_Field_operations, 8)

$GUI_Button_Document_Repository = GUICtrlCreateButton($IniButtonNames[8][1], 690 - 140, 5, 120, 30)
GUICtrlSetResizing($GUI_Button_Document_Repository, 8)

$GUI_Button_open_KB = GUICtrlCreateButton($IniButtonNames[9][1], 815 - 140, 5, 130, 30)
GUICtrlSetResizing($GUI_Button_open_KB, 8)

$GUI_Button_Search_sub = GUICtrlCreateButton($IniButtonNames[10][1], 950 - 140, 5, 130, 30)
GUICtrlSetResizing($GUI_Button_Search_sub, 8)

;-------------------------
;options

;~ If $inioptions_Enable[1][1] = 1 Then Run(@ScriptDir & "\" & $inioptions_apps[1][1])


;-------------------------

;~ AdlibEnable('_marqueecontrol', 15 * 60000)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;hotkeys
;~ HotKeySet("{F1}", "HotKeyFunc") ;need to fix
;~ HotKeySet("{F6}", "HotKeyFunc")
;~ HotKeySet("{F4}", "HotKeyFunc")
;~ HotKeySet("{F3}", "HotKeyFunc")
;~ HotKeySet("{ESC}", "HotKeyFunc")


GUISetState()
WinActivate($gui)
;$oIE1.visible = 1
;$oIE3 = _IENavigate($oIE1, $iniweb[1][1])
;~ Sleep(1000)
;~ $oIE2 = _IECreate("about:blank", 0, 0)
;~ $oIE2.AddressBar = 0
;~ $oIE2.MenuBar = 0
;~ $oIE2.StatusBar = 0
;~ $oIE2.ToolBar = 0
;~ $uID2 = Random(1000, 100000000)
;~ $oIE2.document.title = $uID2
;~ WinWait($uID2)
;~ $hoIE2 = WinGetHandle($uID2)
;~ $pid2 = WinGetProcess($hoIE2)
;~ DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hoIE2, "int", -16, "long", $WS_CHILD)
;~ DllCall("user32.dll", "int", "SetParent", "hwnd", $hoIE2, "hwnd", $gui)
;repositionIEs()


;~ $oIE2.visible = 1
;~ _marqueecontrol()
WinActivate($oIE1)
$x = 0
While 1
    $msg = GUIGetMsg()
    ;$trr = WinGetTitle($hoIE1)
    Select
;~      Case $trr = $ininame[3][1]  ;SunTrust Intranet
;~          GUICtrlDelete($oIE2)
;~          WinActivate($oIE1)
;~          _IENavigate($oIE1, $iniweb[1][1])  ;http://usdp/CAisd/pdmweb.exe
;~          Sleep(1000)
;~          $oIE2 = _IECreate("about:blank", 0, 0)
;~          $oIE2.AddressBar = 0
;~          $oIE2.MenuBar = 0
;~          $oIE2.StatusBar = 0
;~          $oIE2.ToolBar = 0
;~          $uID2 = Random(1000, 100000000)
;~          $oIE2.document.title = $uID2
;~          WinWait($uID2)
;~          $hoIE2 = WinGetHandle($uID2)
;~          $pid2 = WinGetProcess($hoIE2)
;~          DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hoIE2, "int", -16, "long", $WS_CHILD)
;~          DllCall("user32.dll", "int", "SetParent", "hwnd", $hoIE2, "hwnd", $gui)
;~          repositionIEs()
;~          WinActivate($oIE1)
;--------------------------------------------------------------------------------------------------         
;~          While 1 ;attempt to fix bass password entry by single signon - needs work
;~              Select
;~                  Case $trr = $ininame[3][1]  ;SunTrust Intranet
;~                      $oIE2.visible = 0
;~                      WinActivate($oIE1)
;~                      _IENavigate($oIE1, $iniweb[1][1]);http://usdp/CAisd/pdmweb.exe
;~                      While 1
;~                          Select
;~                              Case $trr = $ininame[3][1]  ;SunTrust Intranet
;~                                  $oIE2.visible = 0
;~                                  WinActivate($oIE1)
;~                                  _IENavigate($oIE1, $iniweb[1][1]);http://usdp/CAisd/pdmweb.exe
;~                                  While 1
;~                                      Select
;~                                          Case $trr = $ininame[3][1] ;SunTrust Intranet
;~                                              $oIE2.visible = 0
;~                                              MsgBox(0, "Error", "User ID or Password Incorrect. Closing Viewer", 5)
;~                                              Exit
;~                                          Case $trr = $ininame[5][1] ;Unicenter ServicePlus Service Desk - Announcements
;~                                              $oIE2.visible = 1
;~                                              WinActivate($oIE1)
;~                                              ExitLoop
;~                                      EndSelect
;~                                  WEnd
;~                              Case $trr = $ininame[5][1] ;Unicenter ServicePlus Service Desk - Announcements
;~                                  $oIE2.visible = 1
;~                                  WinActivate($oIE1)
;~                                  ExitLoop
;~                          EndSelect
;~                      WEnd
;~                  Case $trr = $ininame[5][1] ;Unicenter ServicePlus Service Desk - Announcements
;~                      $oIE2.visible = 1
;~                      WinActivate($oIE1)
;~                      ExitLoop
;~              EndSelect
;~          WEnd
;----------------------------------------------------------------------------------------------------
        Case $msg = $GUI_EVENT_CLOSE
;~          $t1 = $ininame[3][1]
;~          $t2 = $ininame[4][1]
;~          WinActivate($hoIE1)
;~          $trr = WinGetTitle($hoIE1)
;~          If $trr = $t1 Then ExitLoop
;~          If $trr = $t2 Then ExitLoop
;~          WinActivate($hoIE1)
;~          Send("!u")
;~          Sleep(10)
;~          WinActivate($hoIE1)
;~          Send("e")
;~          $l = 1
;~          Do
;~              $trr = WinGetTitle($hoIE1)
;~              Sleep(100)
;~              $l = $l+1
;~          Until $trr = $t2 Or $trr = $t1 or $l = 50
;~          ;$oIE2 = 0
;~          $oIE1 = 0
;~          ProcessClose($pid1)
            ;ProcessClose($pid2)
            ExitLoop
;~      Case sizeEvent($msg)
;~          repositionIEs()
;~      Case $msg = $GUI_EVENT_RESIZED ;possible bug - taken out for the moment to test later
;~          _ResizeLimit($title, "", $w - 100, $h - 100, @DesktopWidth, @DesktopHeight)
;~      Case $msg = $GUI_Button_CTS_web
;~          _IECreate($iniweb[2][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_Depot_web
;~          _IECreate($iniweb[3][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_SC_web
;~          _IECreate($iniweb[4][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_problem_board
;~          _IECreate($iniweb[5][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_Service_request
;~          _IECreate($iniweb[6][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_SR_Archive ;removed. Need to redo array to fix numbers
;~          _IECreate($iniweb[7][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_Field_operations
;~          _IECreate($iniweb[8][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_Document_Repository
;~          _IECreate($iniweb[9][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_open_KB
;~          _IECreate($iniweb[10][1])
;~          WinActivate($oIE1)
;~      Case $msg = $GUI_Button_Search_sub
;~          _IECreate($iniweb[11][1])
;~          WinActivate($oIE1)
    EndSelect
    
WEnd
;possible bug - maybe need to make the IE windows = 0 to destroy
;~ $oIE2 = 0
;~ $oIE1 = 0
;~ ProcessClose($pid1)
;~ ProcessClose($pid2)

Exit

;~ Func _ResizeLimit($title, $Text = "", $MinWidth = 150, $MinHeight = 150, $MaxWidth = @DesktopWidth, $MaxHeight = @DesktopHeight)
;~  If Not WinExists($title, $Text) Then Return SetError(1, 0, -1)
;~  Local $PosArr = WinGetPos($title, $Text), $xPos, $yPos, $wPos, $hPos
;~  If IsArray($PosArr) Then
;~      $xPos = $PosArr[0]
;~      $yPos = $PosArr[1]
;~      $wPos = $PosArr[2]
;~      $hPos = $PosArr[3]
;~      If ($wPos <> $MinWidth And $hPos <> $MinHeight) Or ($wPos <> $MaxWidth And $hPos <> $MaxHeight) Then
;~          If $wPos < $MinWidth And $hPos < $MinHeight Then WinMove($title, $Text, $xPos, $yPos, $MinWidth, $MinHeight)
;~          If $wPos < $MinWidth And $hPos >= $MinHeight Then WinMove($title, $Text, $xPos, $yPos, $MinWidth, $hPos)
;~          If $wPos >= $MinWidth And $hPos < $MinHeight Then WinMove($title, $Text, $xPos, $yPos, $wPos, $MinHeight)

;~          If $wPos > $MaxWidth And $hPos > $MaxHeight Then WinMove($title, $Text, $xPos, $yPos, $MaxWidth, $MaxHeight)
;~          If $wPos > $MaxWidth And $hPos <= $MaxHeight Then WinMove($title, $Text, $xPos, $yPos, $MaxWidth, $hPos)
;~          If $wPos <= $MaxWidth And $hPos > $MaxHeight Then WinMove($title, $Text, $xPos, $yPos, $wPos, $MaxHeight)
;~      EndIf
;~  EndIf
;~ EndFunc   ;==>_ResizeLimit

;Func repositionIEs()
;   $pos1 = ControlGetPos($gui, "", "Static1")
    ;$pos2 = ControlGetPos($gui, "", "Static2")
;   WinMove($hoIE1, "", $pos1[0], $pos1[1], $pos1[2], $pos1[3])
    ;WinMove($hoIE2, "", $pos2[0], $pos2[1], $pos2[2], $pos2[3])
;EndFunc   ;==>repositionIEs

;~ Func sizeEvent($event)
;~  If $event = $GUI_EVENT_MAXIMIZE Or _
;~          $event = $GUI_EVENT_MINIMIZE Or _
;~          $event = $GUI_EVENT_RESTORE Or _
;~          $event = $GUI_EVENT_RESIZED Then
;~      Return True
;~  Else
;~      Return False
;~  EndIf
;~ EndFunc   ;==>sizeEvent

;~ Func _marqueecontrol()
;~  Dim $aLinks[11]
;~  Local $htmlfile, $makehtml
;~  $htmlfile = @ScriptDir & "\bin\html.txm"
;~  FileOpen($htmlfile, 8 + 2)
;~  FileWrite($htmlfile, "")
;~  FileClose($htmlfile)
;~  $makehtml = FileOpen($htmlfile, 8 + 1)
;~  $oIEb = _IECreate($iniweb[5][1], 0, 0)
;~  $colTables = _IETableGetCollection($oIEb, 1)
;~  $avTable = _IETableWriteToArray($colTables)
;~  $oLinks = _IELinkGetCollection($oIEb)
;~  $iNumLinks = @extended
;~  $sHTML = ""
;~  $sHTML &= '<body scroll=no topmargin=0 BGCOLOR=LTGREEN>'
;~  $sHTML &= '<marquee behavior=scroll direction=left scrolldelay=2 scrollamount=2 onmouseover="this.stop()" onmouseout="this.start()") >'
;~  $sHTML &= '<span style="background-color: #FFFFFF">******** Solution Center Problem Board Marquee ********</span>                        '
;~  For $i = 0 To $iNumLinks
;~      $sHTML &= '                      #' & $i + 1 & '  '
;~      $sHTML &= '<span style="background-color: #FFFF00"> <B>Last Update: </b>'
;~      $sHTML &= '<a target="_blank" href= "' & $oLinks.item ($i + 3).href & '">' & $avTable[0][$i + 1] & "</a>         <b>Master#</b> " & $avTable[1][$i + 1]
;~      $sHTML &= "       <b>Description: </b> " & $avTable[2][$i + 1]
;~      $sHTML &= "       <b>Region:</b> " & $avTable[3][$i + 1]
;~      $sHTML &= "       <b>Resolve Date:</b> " & $avTable[4][$i + 1] & '</span>'
;~      If $i = 9 Then ExitLoop
;~  Next
;~  $sHTML &= '                                </marquee></body>'
;~  $writehtml = FileWrite($htmlfile, $sHTML)
;~  $fr = FileRead(@ScriptDir & "\bin\html.txm")
;~  $makemarquee = _IEDocWriteHTML($oIE2, $fr)
;~  FileClose($htmlfile)
;~  _IEQuit($oIEb)
;~  WinActivate($oIE1)
;~ EndFunc   ;==>_marqueecontrol

Func _inisettings() ;keeps all websites in ini file. This allows for updates.
    $iniweb = IniReadSection(@ScriptDir & "\bin\cfgusd.cud", "1")
    $IniButtonNames = IniReadSection(@ScriptDir & "\bin\cfgusd.cud", "2")
    $ininame = IniReadSection(@ScriptDir & "\bin\cfgusd.cud", "3")
    $inioptions_apps = IniReadSection(@ScriptDir & "\bin\options.cud", "1")
    $inioptions_Enable = IniReadSection(@ScriptDir & "\bin\options.cud", "2")
    #cs
        iniweb
        1= Main USD
        2= CTS portal
        3= Depot
        4= SC - internal
        5= problem board
        6= Service request
        7= SR - archive
        8= Field Operations
        
        note - make button names changeable? offer choices?
        
        
    #ce
EndFunc   ;==>_inisettings

;func _searchKB()
; to be built
;EndFunc

Func HotKeyFunc()
;~  Opt("WinTitleMatchMode", 2)
;~  If WinActive("Update Incident - Unicenter ServicePlus Service Desk") Then; Set the window
;~      Switch @HotKeyPressed
;~          Case "{F4}"
;~              If WinExists("USD Configuration Item Tool", "Help") = 0 Then Run(@ScriptDir & "/CIT.exe")
;~      EndSwitch
;~  Else
;~      HotKeySet(@HotKeyPressed)
;~      Send(@HotKeyPressed)
;~      HotKeySet(@HotKeyPressed, "HotKeyFunc")
;~  EndIf
;~  If WinActive("Update Request - Unicenter ServicePlus Service Desk") Then; Set the window
;~      Switch @HotKeyPressed
;~          Case "{F4}"
;~              If WinExists("USD Configuration Item Tool", "Help") = 0 Then Run(@ScriptDir & "/CIT.exe")
;~      EndSwitch
;~  Else
;~      HotKeySet(@HotKeyPressed)
;~      Send(@HotKeyPressed)
;~      HotKeySet(@HotKeyPressed, "HotKeyFunc")
;~  EndIf
;~  If WinActive("Create New Incident") Then; Set the window
;~      Switch @HotKeyPressed
;~          Case "{F4}"
;~              If WinExists("USD Configuration Item Tool", "Help") = 0 Then Run(@ScriptDir & "/CIT.exe")
;~      EndSwitch
;~  Else
;~      HotKeySet(@HotKeyPressed)
;~      Send(@HotKeyPressed)
;~      HotKeySet(@HotKeyPressed, "HotKeyFunc")
;~  EndIf
;~  If WinActive("Create New Request") Then; Set the window
;~      Switch @HotKeyPressed
;~          Case "{F4}"
;~              If WinExists("USD Configuration Item Tool", "Help") = 0 Then Run(@ScriptDir & "/CIT.exe")
;~      EndSwitch
;~  Else
;~      HotKeySet(@HotKeyPressed)
;~      Send(@HotKeyPressed)
;~      HotKeySet(@HotKeyPressed, "HotKeyFunc")
;~  EndIf
;~  If @HotKeyPressed = "{F6}" Then
;~      If WinExists("QuickPaste 2.0", "Paste") = 0 Then
;~          Run(@ScriptDir & "/quickpaste2_0.exe")
;~      EndIf
;~  Else
;~      HotKeySet(@HotKeyPressed)
;~      Send(@HotKeyPressed)
;~      HotKeySet(@HotKeyPressed, "HotKeyFunc")
;~  EndIf
;~  If WinActive($title) Then; Set the window
;~      Switch @HotKeyPressed
;~          Case "{F1}"
;~              $n = IniRead(@ScriptDir & "\bin\cfgusd.cud", "6", "1","")
;~              If WinExists($n) = 0 Then ShellExecute(@ScriptDir & "\"&$n)
;~      EndSwitch
;~  Else
;~      HotKeySet(@HotKeyPressed)
;~      Send(@HotKeyPressed)
;~      HotKeySet(@HotKeyPressed, "HotKeyFunc")
;~  EndIf
    
EndFunc   ;==>HotKeyFunc

Share this post


Link to post
Share on other sites
Jos

I'm stumped and I have no idea why this is happening. I've tried to cut out just about everything on this script to make it as vanilla as possible in troubleshooting it, but I do not see what the problem is. For some reason, (and only this script is causing it) when I

  • run it from Scite
  • while running the script, I go to click on a command in the script
  • press F1
The script will try to rerun itself about 6 times. It makes no sence. I do notice the alt key is acting like it is in the down position, but I do not see any reason why.

This is a known issue with SciTE's Job queue and currently there is nothing that can be done about it.

Hope the new JobQueue proposal that is being made will solve this issue.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Bert

Any update on this? I did figure out my Alt key gets stuck in the pressed position when I use any script I've compiled. Just pressing the key will fix my issue when the script runs, but that is only a work around. This workaround is not something I want to tell my users when I distribute a program. I've attempted to reinstall SciTe, and the entire AutoIt suite for that matter. I hate to have to reimage my PC, but I really need to get this fixed. It is causing me a loss in production.

The weird thing is it doesn't happen every time. Just about 50% of the time.

I can compile something real simple like this and it can happen:

msgbox(0, "test", "test")

This issue is happening with all my scripts at this point. If I attempt to give anyone a compiled EXE, the same issue happens to them on their PC.

Share this post


Link to post
Share on other sites
Jos

It is not something I am going to fix myself and we are depending on the developers of SciTE to work on it.

It is still not for sure if they really will update the JobQueue portion of SciTE so at this moment it is wait and see. :)

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Uten

...

This issue is happening with all my scripts at this point. If I attempt to give anyone a compiled EXE, the same issue happens to them on their PC.

Does your user run your script from SciTe?

I have not studied the code you provided so if it is obvious in there please disregard this question.

Share this post


Link to post
Share on other sites
Bert

I think I figured out the problem, well at least what is causing it. I have a viewer program that runs a duel embedded IE setup. I had ran it at first when I reimaged to test to see if my problem had returned. I decided to backtrack and look at a old script. I noticed I had changed the following.

Opt("TrayIconDebug", 1)
_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
$oIE2 = _IECreateEmbedded()
$w = @DesktopWidth
$h = @DesktopHeight
$h1 = $h - 150
$w1 = $w - 40
$w2 = $w - 60
$h2 = $h - 25
Dim $ininame, $IniButtonNames, $iniweb, $inioptions_Enable, $inioptions_apps, $x, $oIE1, $oIE2
_inisettings()
$title = $ininame[1][1]
$gui = GUICreate($title, $w1, $h1, -1, -1, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))
$label1 = GUICtrlCreateLabel("", 10, 68, $w - 60, $h - 230)
GUICtrlSetBkColor(-1, 0xff0000)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetState(-1, $GUI_HIDE)
$label2 = GUICtrlCreateLabel("", 10, 40, $w1 - 20, 23)
GUICtrlSetBkColor(-1, $GUI_DISABLE)
GUICtrlSetState(-1, $GUI_HIDE)
$oIE1 = _IECreate("about:blank", 0, 0)
$oIE1.AddressBar = 0
$oIE1.MenuBar = 0
$oIE1.StatusBar = 0
$oIE1.ToolBar = 0
$uID1 = Random(1000, 100000000)
$oIE1.document.title = $uID1
WinWait($uID1)
$hoIE1 = WinGetHandle($uID1)
$mainwwindow = WinGetHandle($title)
$pid1 = WinGetProcess($hoIE1)
DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hoIE1, "int", -16, "long", $WS_POPUP)
DllCall("user32.dll", "int", "SetParent", "hwnd", $hoIE1, "hwnd", $gui)
$oIE2 = _IECreate("about:blank", 0, 0)
$oIE2.AddressBar = 0
$oIE2.MenuBar = 0
$oIE2.StatusBar = 0
$oIE2.ToolBar = 0
$uID2 = Random(1000, 100000000)
$oIE2.document.title = $uID2
WinWait($uID2)
$hoIE2 = WinGetHandle($uID2)
$pid2 = WinGetProcess($hoIE2)
DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hoIE2, "int", -16, "long", $WS_POPUP)
DllCall("user32.dll", "int", "SetParent", "hwnd", $hoIE2, "hwnd", $gui)
repositionIEs()

On my dllcall, I had changed the line to this: DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hoIE2, "int", -16, "long", $WS_CHILD)

This fixed a logon issue with Novle's Single signon, but caused a issue for it was causing the Alt key to be stuck in the down position. Also I noticed the script would run slower when trying to exit. Anyone got a idea on how to fix it?

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  

×