Jump to content
Sign in to follow this  
jmon

Create labels over tabs and follow tabs on up-down click (SOLVED)

Recommended Posts

jmon

Hello everyone,

I am trying to create some labels over some tabs, to kind of highlights tabs.

I get the position of the tabs, and move the labels over them. When I use the up-down control to move the tabs, I need to compute the position again. The problem is that in the execution order, the labels are refreshed before the position of the tabs and I don't know how to change that (that creates a sort of delay and the labels don't stick to the tabs because the tabs move after the labels have been refreshed).

I found that the WM_NOTIFY -722 is sent when you click on the up-down.

Check out the example below, and try to enable the "sleep" at line 101 to see the refresh order.

#include <StructureConstants.au3>
#include <TabConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <Math.au3>


Global $hTab, $GUI
_Main()

Func _Main()

$GUI = GUICreate("Test", 500, 500)
$hTab = GUICtrlCreateTab(50, 50, 396, 296)
GUISetState()
_GUICtrlTab_SetMinTabWidth(GUICtrlGetHandle($hTab), 100)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

_Tab_Add(0, "Tab 1", 0xFFFF00) ;Tab 1 will be yellow
_Tab_Add(1, "Tab 2")
_Tab_Add(2, "Tab 3")
_Tab_Add(3, "Tab 4", 0x00FF00) ;tab 4 is green
_Tab_Add(4, "Tab 5", 0x0000FF) ;tab 5 is blue

_Tab_Hightlight(0)
_Tab_Hightlight(3)
_Tab_Hightlight(4)

; Loop until user exits
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>_Main


Func _Tab_Add($iItem, $sText, $iColor = 0xFF0000)
Local $iTab = _GUICtrlTab_InsertItem($hTab, $iItem, $sText)

$aRect = _GUICtrlTab_GetItemRect($hTab, $iTab)
If Not IsArray($aRect) Then Return SetError(1, 0, 0)

$iCtrl = GUICtrlCreateLabel("", $aRect[0], $aRect[1], 100, 2)
GUICtrlSetBkColor($iCtrl, $iColor)
GUICtrlSetState($iCtrl, $GUI_HIDE + $GUI_DISABLE)
_GUICtrlTab_SetItemParam($hTab, $iTab, $iCtrl)

EndFunc ;==>_Tab_Add

Func _Tab_Hightlight($iTabItem, $bHighlight = True)
Local $iCtrl, $aRect

If $bHighlight Then
;highlight:
$iCtrl = _GUICtrlTab_GetItemParam($hTab, $iTabItem)

Local $aPos = ControlGetPos($GUI, '', $hTab)

$aRect = _GUICtrlTab_GetItemRect($hTab, $iTabItem)
If Not IsArray($aRect) Then Return SetError(1, 0, 0)

GUICtrlSetPos($iCtrl, $aPos[0] + $aRect[0], $aPos[1] + $aRect[1])
GUICtrlSetState($iCtrl, $GUI_ONTOP + $GUI_SHOW + $GUI_ENABLE)
Return SetError(0, 0, $iCtrl)

Else
;un-highlight:
$iCtrl = _GUICtrlTab_GetItemParam($hTab, $iTabItem)
GUICtrlSetState($iCtrl, $GUI_HIDE + $GUI_DISABLE)

Return SetError(0, 0, 1)

EndIf

EndFunc ;==>_Tab_Hightlight

Func _tab_RedrawNotif()

Local $aPos = ControlGetPos($GUI, '', $hTab)
If @error Then Return SetError(1, 0, 0)

Local $iCount = _GUICtrlTab_GetItemCount($hTab)
For $i = 0 To $iCount
Local $iCtrl = _GUICtrlTab_GetItemParam($hTab, $i)
$aRect = _GUICtrlTab_GetItemRect($hTab, $i)
If Not IsArray($aRect) Then ContinueLoop

Local $x = _Max($aPos[0], $aPos[0] + $aRect[0])
Local $y = $aPos[1] + $aRect[1]
Local $w = 100
If $x <= $aPos[0] Then
$w = 0
EndIf
If $x + $w > $aPos[1] + $aPos[2] Then
$w = ($aPos[1] + $aPos[2]) - ($x)
EndIf

GUICtrlSetPos($iCtrl, $x, $y, $w)
;~ Sleep ( 50 ) ;!! TRY TO ENABLE THIS SLEEP AND SEE THAT THE LABELS ARE UPDATED BEFORE THE TAB
Next
Return True
EndFunc ;==>_tab_RedrawNotif

Func WM_NOTIFY($hWndGUI, $MsgID, $wParam, $lParam)
Local $tagNMHDR = DllStructCreate("int;int;int;int;int;int;int;ptr;int;int;int;int;int;int;int;int;int;int;int", $lParam)
If @error Then Return

Local $hWndFrom = DllStructGetData($tagNMHDR, 1)
Local $IdFrom = DllStructGetData($tagNMHDR, 2)
Local $Event = DllStructGetData($tagNMHDR, 3)


;Appearently this event (-722) is triggered when the user clicks the up-down on the tabs
If $Event = -722 Then
ConsoleWrite("From : " & $hWndFrom & " idfrom : " & $IdFrom & " event : " & $Event & @CR)
_tab_RedrawNotif()
Return 1
EndIf

Switch $hWndFrom
Case GUICtrlGetHandle($hTab) ;From the tab control:
Switch $Event
Case $NM_RCLICK ;Right click to highlight
Local $tPoint = _WinAPI_GetMousePos(True, GUICtrlGetHandle($hTab))
Local $tHitTest = _GUICtrlTab_HitTest(GUICtrlGetHandle($hTab), DllStructGetData($tPoint, 1), DllStructGetData($tPoint, 2))
If Not $tHitTest = -1 Then
If $tHitTest[0] <> -1 Then
_Tab_Hightlight($tHitTest[0], True)
EndIf
EndIf

Case $TCN_SELCHANGE ;left click or change tab to un-highlight:
Local $iItem = _GUICtrlTab_GetCurFocus(GUICtrlGetHandle($hTab))
If $iItem <> -1 Then
_Tab_Hightlight($iItem, False)
EndIf
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY

Thanks for your time.

PS: I don't want to use the built in function to highlight the tabs because it doesn't work with Uskin dll

[EDIT] Solved in post #4 by LarsJ.

Edited by jmon

Share this post


Link to post
Share on other sites
PhoenixXL

what you are doing is very complicated

try to draw, paint labels and use them to switch your tab

;)

  • Like 1

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites
LarsJ

jmon, If you use custom drawn tabs and the WM_DRAWITEM event to position the labels, you will not have any problems with reordering of the tabs. The WM_DRAWITEM event fires after the reordering.

The example below looks and works fine (Win XP), but custom drawn tabs doesn't look exactly like system drawn.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StructureConstants.au3>
#include <GuiTab.au3>

Global Const $ODT_TAB = 101
Global Const $ODA_DRAWENTIRE = 0x1
Global Const $ODS_SELECTED = 0x0001

Opt( "MustDeclareVars", 1 )

Global $hGui, $idTab, $hTab, $aPos

MainScript()

Func MainScript()

$hGui = GUICreate("Test", 500, 500)

$idTab = GUICtrlCreateTab(50, 50, 400, 296, $TCS_OWNERDRAWFIXED)
$hTab = GUICtrlGetHandle($idTab)
_GUICtrlTab_SetMinTabWidth($hTab, 100)
$aPos = ControlGetPos($hGui, '', $idTab)

GUIRegisterMsg($WM_DRAWITEM, "WM_DRAWITEM")
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
GUISetState()

_GUICtrlTab_InsertItem($hTab, 0, "Tab 0")
_GUICtrlTab_InsertItem($hTab, 1, "Tab 1")
_GUICtrlTab_InsertItem($hTab, 2, "Tab 2")
_GUICtrlTab_InsertItem($hTab, 3, "Tab 3")
_GUICtrlTab_InsertItem($hTab, 4, "Tab 4")
_GUICtrlTab_InsertItem($hTab, 5, "Tab 5")
_GUICtrlTab_InsertItem($hTab, 6, "Tab 6")
_GUICtrlTab_InsertItem($hTab, 7, "Tab 7")
_GUICtrlTab_InsertItem($hTab, 8, "Tab 8")
_GUICtrlTab_InsertItem($hTab, 9, "Tab 9")

TabHighlight(1, 0xFFFF00) ; tab 1 yellow
TabHighlight(4, 0x00FF00) ; tab 4 green
TabHighlight(5, 0x0000FF) ; tab 5 blue

; Loop until user exits
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()

EndFunc

Func TabHighlight($iTab, $iColor)
Local $aDisRect, $aRect, $iCtrl
$aDisRect = _GUICtrlTab_GetDisplayRect($hTab)
$aRect = _GUICtrlTab_GetItemRect($hTab, $iTab)
$iCtrl = GUICtrlCreateLabel("", $aRect[0], $aRect[1], $aRect[2]-$aRect[0]-2, 2)
GUICtrlSetBkColor($iCtrl, $iColor)
If $aRect[0] < $aDisRect[2] Then
GUICtrlSetPos($iCtrl, $aPos[0] + $aRect[0], $aPos[1] + $aRect[1])
GUICtrlSetState($iCtrl, $GUI_ONTOP + $GUI_SHOW + $GUI_ENABLE)
Else
GUICtrlSetState($iCtrl, $GUI_HIDE + $GUI_DISABLE)
EndIf
_GUICtrlTab_SetItemParam($hTab, $iTab, $iCtrl)
EndFunc

Func TabRemoveHighlight()
Local $iCount = _GUICtrlTab_GetItemCount($hTab), $iCtrl
For $i = 0 To $iCount - 1
$iCtrl = _GUICtrlTab_GetItemParam($hTab, $i)
If $iCtrl = 0 Then ContinueLoop
GUICtrlSetState($iCtrl, $GUI_HIDE + $GUI_DISABLE)
Next
EndFunc

Func WM_NOTIFY($hWndGUI, $MsgID, $wParam, $lParam)
Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
Local $hWndFrom = DllStructGetData($tNMHDR, 1)
Local $Event = DllStructGetData($tNMHDR, 3)

;Appearently this event (-722) is triggered when the user clicks the up-down on the tabs
If $Event = -722 Then
TabRemoveHighlight()
Return 1
EndIf

Switch $hWndFrom
Case $hTab
Switch $Event
Case $TCN_SELCHANGE
     Local $iItem = _GUICtrlTab_GetCurFocus(GUICtrlGetHandle($hTab))
     If $iItem <> -1 Then TabRemoveHighlight()
EndSwitch
EndSwitch

Return $GUI_RUNDEFMSG
EndFunc

Func WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam)
Local $tDRAWITEMSTRUCT = DllStructCreate("uint cType;uint cID;uint itmID;uint itmAction;uint itmState;" & _
                     "hwnd hItm;hwnd hDC;dword itmRect[4];dword itmData", $lParam)

If DllStructGetData($tDRAWITEMSTRUCT, "cType") <> $ODT_TAB Then Return $GUI_RUNDEFMSG
If DllStructGetData($tDRAWITEMSTRUCT, "itmAction") <> $ODA_DRAWENTIRE Then Return $GUI_RUNDEFMSG

Local $itmID = DllStructGetData($tDRAWITEMSTRUCT, "itmID")
Local $iCtrl = _GUICtrlTab_GetItemParam($hTab, $itmID)
If $iCtrl Then
Local $aRect = _GUICtrlTab_GetItemRect($hTab, $itmID)
If $aRect[0] > 0 Then
GUICtrlSetPos($iCtrl, $aPos[0] + $aRect[0], $aPos[1] + $aRect[1])
GUICtrlSetState($iCtrl, $GUI_ONTOP + $GUI_SHOW + $GUI_ENABLE)
EndIf
EndIf

Local $tBuffer = DllStructCreate("char[256]")
DllStructSetData($tBuffer, 1, "Tab " & $itmID)
Local $itmText = DllStructGetData($tBuffer, 1)

DllStructSetData($tDRAWITEMSTRUCT, "itmRect", DllStructGetData($tDRAWITEMSTRUCT, "itmRect", 1) + 4, 1)
DllStructSetData($tDRAWITEMSTRUCT, "itmRect", DllStructGetData($tDRAWITEMSTRUCT, "itmRect", 2) + 4, 2)

Local $hDC = DllStructGetData($tDRAWITEMSTRUCT, "hDC")

If DllStructGetData($tDRAWITEMSTRUCT, "itmState") = $ODS_SELECTED Then
_WinAPI_SetTextColor($hDC, 0x0000FF) ; Red, BGR
Else
_WinAPI_SetTextColor($hDC, 0x000000)
EndIf

DllCall("user32.dll", "int", "DrawText", "hwnd", $hDC, "str", $itmText, "int", StringLen($itmText), _
     "ptr", DllStructGetPtr($tDRAWITEMSTRUCT, "itmRect"), "int", $DT_LEFT)

Return $GUI_RUNDEFMSG
EndFunc

Lars

Edited by LarsJ
  • Like 1

Share this post


Link to post
Share on other sites
jmon

Thank you Lars ! :thumbsup:

That's exactly what I was looking for. I was hoping for someone to give me an answer using the WM_DRAWITEM! I had no idea how to use it and it's very powerful.

It works on windows 7 ultimate x64

Thanks a lot,

Jmon

[EDIT]

Works very well, but still having a problem with uSkin: check out post.

Edited by jmon

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  

  • Similar Content

    • nacerbaaziz
      By nacerbaaziz
      Hi dears
      I've got a question in creating tabs in autoit
      Usually in other programs you can move between tabs by pressing ctrl + tab or ctrl + shift + tab
      I tried to create a window  which have a multy  tab but when i press one of the shortcuts
      it does not move between the tabs
      Is there an option to enable or disable this
      Greetings
      this is the example i tryed

      #include <GUIConstants.au3> #include <MsgBoxConstants.au3> #include <TabConstants.au3> #include <ComboConstants.au3> #include <WindowsConstants.au3> #include <GuiComboBox.au3> effectsSettings() func effectsSettings() local $echoCombo[6], $reverbCombo[5],  $CHORUSCombo[8], $flangerCombo[8], $paramEQCombo[4], $distortionCombo[6], $gargleCombo[3] $EffWindow = GUICreate("efects settings", 400, 400, -1, -1, $WS_TABSTOP) local $BtOK = GUICtrlCreateButton("ok", 5, 360, 50, 30, 0x01) GUIStartGroup("") local $BTCancel = GUICtrlCreateButton("cancel", 340, 360, 50, 30) GUIStartGroup("") local $effectTabs =     GUICtrlCreateTab(10, 10, 380, 70) GUICtrlSetState(-1, $GUI_focus)     GUICtrlCreateTabItem("echo") GUICtrlCreateLabel("fWetDryMix", 50, 100, 100, 60) $echoCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fFeedback", 180, 100, 100, 60) $echoCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fLeftDelay", 290, 100, 100, 60) $echoCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fRightDelay", 50, 180, 100, 60) $echoCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40) GUICtrlCreateLabel("lPanDelay", 180, 180, 100, 60) $echoCombo[5] = GUICtrlCreateCombo("", 190, 190, 80, 40)     GUICtrlCreateTabItem("reverb") GUICtrlCreateLabel("fInGain", 50, 100, 100, 60) $ReverbCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fReverbMix", 180, 100, 100, 60) $ReverbCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fReverbTime", 290, 100, 100, 60) $ReverbCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fHighFreqRTRatio", 50, 180, 100, 60) $ReverbCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40)     GUICtrlCreateTabItem("chorus") GUICtrlCreateLabel("fWetDryMix", 50, 100, 100, 60) $ChorusCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fDepth", 180, 100, 100, 60) $ChorusCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fFeedback", 290, 100, 100, 60) $ChorusCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fFrequency", 50, 180, 100, 60) $ChorusCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40) GUICtrlCreateLabel("lWaveform", 180, 180, 100, 60) $ChorusCombo[5] = GUICtrlCreateCombo("", 190, 190, 80, 40) GUICtrlCreateLabel("fDelay", 290, 180, 100, 60) $ChorusCombo[6] = GUICtrlCreateCombo("", 300, 190, 80, 40) GUICtrlCreateLabel("lPhase", 50, 260, 100, 60) $ChorusCombo[7] = GUICtrlCreateCombo("", 60, 270, 80, 40)     GUICtrlCreateTabItem("flanger") GUICtrlCreateLabel("fWetDryMix", 50, 100, 100, 60) $FlangerCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fDepth", 180, 100, 100, 60) $FlangerCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fFeedback", 290, 100, 100, 60) $FlangerCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fFrequency", 50, 180, 100, 60) $FlangerCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40) GUICtrlCreateLabel("lWaveform", 180, 180, 100, 60) $FlangerCombo[5] = GUICtrlCreateCombo("", 190, 190, 80, 40) GUICtrlCreateLabel("fDelay", 290, 180, 100, 60) $FlangerCombo[6] = GUICtrlCreateCombo("", 300, 190, 80, 40) GUICtrlCreateLabel("lPhase", 50, 260, 100, 60) $FlangerCombo[7] = GUICtrlCreateCombo("", 60, 270, 80, 40)     GUICtrlCreateTabItem("paramatric eq") GUICtrlCreateLabel("fCenter", 50, 100, 100, 60) $parameqCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fBandwidth", 180, 100, 100, 60) $ParamEqCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fGain", 290, 100, 100, 60) $parameqCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40)     GUICtrlCreateTabItem("distortion") GUICtrlCreateLabel("fGain", 50, 100, 100, 60) $distortionCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fEdge", 180, 100, 100, 60) $distortionCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fPostEQCenterFrequency", 290, 100, 100, 60) $distortionCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fFrequency", 50, 180, 100, 60) $distortionCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40) GUICtrlCreateLabel("fPostEQBandwidth", 180, 180, 100, 60) $distortionCombo[5] = GUICtrlCreateCombo("", 190, 190, 80, 40)     GUICtrlCreateTabItem("gargle") GUICtrlCreateLabel("dwRateHz", 50, 100, 100, 60) $gargleCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("dwWaveShape", 180, 100, 100, 60) $gargleCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUISetState(@sw_show, $EffWindow) While 1 Switch GUIGetMSG() case $GUI_Event_close, $BTCancel exit EndSwitch Wend return "" endFunc
    • nassausky
      By nassausky
      Hi all,
       
      Anyone have any idea how to close all open tabs except a specific one I manually open.  Assuming I don't know what is open in all the tabs except just the one I want to keep open.
       
      I didn't want to use sendkeys and I was trying to use the following code to list the title (or url) of the 3 open tabs and  after I got that part working I would just close the other 2. This sample only displays the title of the first open tab
      #include <IE.au3> Const $ie_new_in_tab = 0x0800 $oIE = _IECreate("https://www.autoitscript.com") __IENavigate($oIE, "https://www.autoitscript.com/forum/", 1, $ie_new_in_tab) ;(obj,url,wait,param) __IENavigate($oIE, "https://www.google.com/", 1, $ie_new_in_tab) ;(obj,url,wait,param) Local $aIE[1] $aIE[0] = 0 Local $i = 1, $oIE While 1     $oIE = _IEAttach("", "instance", $i)     If @error = $_IEStatus_NoMatch Then ExitLoop     ConsoleWrite(_IEPropertyGet($oIE, "title") & @CRLF)     ReDim $aIE[$i + 1]     $aIE[$i] = $oIE ;each item holds object     $aIE[0] = $i ;first item holds count     $i += 1 WEnd MsgBox($MB_SYSTEMMODAL, "Browsers Found", "Number of browser instances in the array: " & $aIE[0]) ; This doesn't return the list of tabs in the console just the first tab  
      Thanks for any and all help
    • Miliardsto
      By Miliardsto
      Hello I got these tabs
       
      Global $TabMain = GUICtrlCreateTabItem("Main") Global $Action = GUICtrlCreateTabItem("Actions") Global $TabThings = GUICtrlCreateTabItem("Things") As we know to change tab we have to click with mouse on tab name like here it looks like below.
      Is there possibility to change tab without click on the tab but change by click on button for example?

    • kawliga751
      By kawliga751
      I am trying to script the opening of multiple tabs in IE with each tab having a separate login/password. I have been able to make a successful script that will open 3 separate IE sessions with the correct webpage and login or a script that will open 3 tabs in one session (which I want) but will not login. I have tried _IECreate, IEAttach etc. This is the script I am currently using . 
      #include <IE.au3> Const $navOpenInNewTab = 0x0800 Dim $oIE = _IECreate('http://asag.xxxxxxx.com/AAAA/index.htm') ;$o_IE.Navigate2('http://asag.xxxxxxx.com/apps/yyyyyyy/LogInSAG/login.asp', $navOpenInNewTab) ;$o_IE.Navigate2('http://asag.xxxxxxx.com/apps/yyyyyyy/LogInSAG/login.asp', $navOpenInNewTab) Call ("YYYYYYYSignIn") Func YYYYYYYSignIn () Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") $oIE.Navigate2('http://asag.xxxxxxx.com/apps/xxxxxxx/LogInSAG/login.asp',2048) _IEFormElementSetValue ($username, "xxxxxxx") _IEFormElementSetValue ($password, "xxxxxxx") Send('{Enter}') EndFunc Call ("xxxxxxxSignIn") Func xxxxxxxSignIn () __IENavigate($oIE, "https://soa1gui.xxxxxxx.biz/gateway/NFServlet;jsessionid=1E3B8F6520DE0A1EC914A8ABB7E86341?NFH_MessageId=&NFH_Page=%2fpages%2fsearch%2fsearch.jsp", 1, 0x800) Local $domain = _IEGetObjByName ($oIE,"NF_CustomerID") Local $User_Name = _IEGetObjByName ($oIE,"NF_UserName") Local $Password = _IEGetObjByName ($oIE,"NF_Password") _IEFormElementSetValue ($domain, xxxxxxx") _IEFormElementSetValue ($User_Name, "xxxxxxx") _IEFormElementSetValue ($Password, "xxxxxxx") ;Send('{Enter}') EndFunc  
    • Skeletor
      By Skeletor
      Hi Guys,
      I've been reading this post ...
      When I came accross the examples, non of them had what I was looking for.
      I basically want to "snapshot" my GUI's multiple tabs and send them into the pdf.
      A little nudge from you guys would be great.
      Im really stuck with this one, therefore I have no code.
      Lets discuss or point me in a right direction... thanks alot
       

×