Sign in to follow this  
Followers 0
Juvigy

More that 1 GUI at the same time

10 posts in this topic

I have 3 GUI that are running.

But when i do something like:

While 1

$msg1 = GUIGetMsg($hGui2)

$msg = TrayGetMsg()

$msg2 = GUIGetMsg($hGUI3)

If $msg1 = $GUI_EVENT_CLOSE Then

GUIDelete($hGui2)

if UBound($test2)>1 then

ShowMsg($test2[1])

$test2 = 0

EndIf

EndIf

Select

Case $msg = 0

ContinueLoop

Case $msg = $aboutitem

TrayItemSetState($aboutitem,4)

Case $msg = $exititem

$test2 = 0

GUIDelete($hGui2)

ExitLoop

EndSelect

WEnd

It doesnt work. When i press the X on the corner to close one of the GUIs it doesnt work. If i right click and select "close" it works.

Anything that i am doing wrong? Whole script is huge to post it here. One of the GUIs is for output of msgs, the other one is dummy for the tray and the third is for GUIregistermsg purposes.

Share this post


Link to post
Share on other sites



The wiki has a very good tutorial that describes how to manage multiple GUIs: http://www.autoitscript.com/wiki/Managing_Multiple_GUIs


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The wiki has a very good tutorial that describes how to manage multiple GUIs: http://www.autoitscript.com/wiki/Managing_Multiple_GUIs

Thanks i have missed the parameter. Now i have this which works if i press the X of the GUI , but doesnt work if i press the exit button.

Switch $aMsg[1] ; First check which GUI sent the message
     Case $hGui2
        Switch $aMsg[0] ; Now check for the messages sent from $hGui2
            Case $GUI_EVENT_CLOSE
                GUIDelete($hGui2)
                if UBound($test2)>1 then
                    ShowMsg($test2[1])
                    $test2 = 0
                EndIf
            Case $Exitbutton
                GUIDelete($hGui2)
                ConsoleWrite($Exitbutton&@CRLF)
        EndSwitch
EndSwitch
Edited by Juvigy

Share this post


Link to post
Share on other sites

Juvigy,

You should know by now that when posting code use the [autoit][/autoit] tags. Secondly, post a small reproducer we can look at or try and debug the code yourself. by taking parts out and stripping it back.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

I tried debugging but couldnt find anything.

The button is created as i see it on the GUI. Just pressing it doesnt have any effect.

The GUI creation is in the ShowMsg() function :

$hGui2=GUICreate('', $iW, $iH,(@DesktopWidth-$iW)/2,(@DesktopHeight-$iH)/2,$WS_CAPTION+$WS_POPUP+$WS_SYSMENU,$WS_EX_TOPMOST)
GUISetBkColor(0xff0001, $hGui2)
$Label11 = GUICtrlCreateLabel("", 0, 0, $iW/2+50,20)
$Label12 = GUICtrlCreateLabel("", $iW/2, 0, $iW/2,20)
$Label21 = GUICtrlCreateLabel("", 0, 20,  $iW/2,20)
$Label22 = GUICtrlCreateLabel("", $iW/2, 20, $iW/2,20)
$Label31 = GUICtrlCreateLabel("", 0, 40, $iW/2+50,20)
$Label32 = GUICtrlCreateLabel("", $iW/2, 40, $iW/2,20)
$Label41 = GUICtrlCreateLabel("", 0, 60,  $iW/2,20)
$Label42 = GUICtrlCreateLabel("", $iW/2, 60, $iW/2,20)
$Label51 = GUICtrlCreateLabel("", 0, 80, $iW/2+50,20)
$Label52 = GUICtrlCreateLabel("", $iW/2, 80, $iW/2,20)
$Label61 = GUICtrlCreateLabel("", 0, 100,  $iW/2,20)
$Label62 = GUICtrlCreateLabel("", $iW/2, 100, $iW/2,20)
$Label71 = GUICtrlCreateLabel("", 0, 120,  $iW/2,20)
$Label72 = GUICtrlCreateLabel("", $iW/2, 120, $iW/2,20)
$Exitbutton = GUICtrlCreateButton("Exit", 0, $iH-30, $iW,30)
ConsoleWrite($Exitbutton&@CRLF)
GUICtrlSetFont($Label11, 10, 700)
GUICtrlSetFont($Label12, 10, 700)
GUICtrlSetFont($Label21, 10, 700)
GUICtrlSetFont($Label22, 10, 700)
GUICtrlSetFont($Label31, 10, 700)
GUICtrlSetFont($Label32, 10, 700)
GUICtrlSetFont($Label41, 10, 700)
GUICtrlSetFont($Label42, 10, 700)
GUICtrlSetFont($Label51, 10, 700)
GUICtrlSetFont($Label52, 10, 700)
GUICtrlSetFont($Label61, 10, 700)
GUICtrlSetFont($Label62, 10, 700)
GUICtrlSetFont($Label71, 10, 700)
GUICtrlSetFont($Label72, 10, 700)
GUICtrlSetBkColor($Label11,0xBFCFFF)
GUICtrlSetBkColor($Label12,0xBFCFFF)
GUICtrlSetBkColor($Label21,0xBFCFFF)
GUICtrlSetBkColor($Label22,0xBFCFFF)
GUICtrlSetBkColor($Label31,0xBFCFFF)
GUICtrlSetBkColor($Label32,0xBFCFFF)
GUICtrlSetBkColor($Label41,0xBFCFFF)
GUICtrlSetBkColor($Label42,0xBFCFFF)
GUICtrlSetBkColor($Label51,0xBFCFFF)
GUICtrlSetBkColor($Label52,0xBFCFFF)
GUICtrlSetBkColor($Label61,0xBFCFFF)
GUICtrlSetBkColor($Label62,0xBFCFFF)
GUICtrlSetBkColor($Label71,0xBFCFFF)
GUICtrlSetBkColor($Label72,0xBFCFFF)
GUICtrlSetData($Label11,"User Name is:")
GUICtrlSetData($Label12,$users[$test][0])
GUICtrlSetData($Label21,"Phone Number:")
GUICtrlSetData($Label22,$users[$test][1])
GUICtrlSetData($Label31,"Location:")
GUICtrlSetData($Label32,$users[$test][2])
GUICtrlSetData($Label41,"Department:")
GUICtrlSetData($Label42,$users[$test][3])
GUICtrlSetData($Label51,"Function:")
GUICtrlSetData($Label52,$users[$test][4])
GUICtrlSetData($Label61,"Line Manager:")
GUICtrlSetData($Label62,$users[$test][5])
GUICtrlSetData($Label71,"You have typed:")
GUICtrlSetData($Label72,$users[$test][6])
;~  GUISetState(@SW_SHOW, $hGui2)
GUISetState()
EndFunc

Share this post


Link to post
Share on other sites

Unfortunately we can't help you because the code you posted is incomplete. Where do you check the button?

As guinness posted: We need a small reproducer script!


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Hi Water ,

See my prev. post (the edited one) - there is where i check for the button. I will see what i can conjure for a reprodicer.

Edit:

Cant make a small script reproducer - it works if i make only th show function and the main while loop...

Edited by Juvigy

Share this post


Link to post
Share on other sites

Edit:

Cant make a small script reproducer - it works if i make only th show function and the main while loop...

Post the reproducer you made.

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

The reprodicer is not a good one - it works as intended. In my bigger script it doesnt work.

It doesnt make sense the $gui_event_close to work and the button , not to work.

Global $result ,$users, $FilePath = "C:File.xlsm"
Global $hGui2, $but,$Label, $iW = 500, $iH = 230,$test2,$Exitbutton
Opt("TrayMenuMode",1)
$aboutitem = TrayCreateItem("About")
TrayCreateItem("")
$lastitem = TrayCreateItem("Last")
TrayCreateItem("")
$exititem = TrayCreateItem("Exit")
TraySetState()
TraySetToolTip("VIPMaster 1.0")
TraySetIcon("Shell32.dll",-18)
$hGUI3 = GUICreate("Clipboard",10,10)
GUISetState(@SW_HIDE)
; Initialize clipboard viewer
$hNext = _ClipBoard_SetViewer ($hGUI3)
GUIRegisterMsg($WM_CHANGECBCHAIN, "WM_CHANGECBCHAIN")
GUIRegisterMsg($WM_DRAWCLIPBOARD, "WM_DRAWCLIPBOARD")
ShowMsg()
While 1
$msg = TrayGetMsg()
$aMsg = GUIGetMsg(1) ; Use advanced parameter to get an array returned
Switch $aMsg[1] ; First check which GUI sent the message
     Case $hGui2
        Switch $aMsg[0] ; Now check for the messages sent from $hGui2
            Case $GUI_EVENT_CLOSE
                GUIDelete($hGui2)
   Case $Exitbutton
    GUIDelete($hGui2)
    ConsoleWrite($Exitbutton&@CRLF)
  EndSwitch
EndSwitch
WEnd
Exit
Func WM_CHANGECBCHAIN($hWnd, $iMsg, $iwParam, $ilParam)
; If the next window is closing, repair the chain
If $iwParam = $hNext Then
  $hNext = $ilParam
  ; Otherwise pass the message to the next viewer
ElseIf $hNext <> 0 Then
  _SendMessage ($hNext, $WM_CHANGECBCHAIN, $iwParam, $ilParam, 0, "hwnd", "hwnd")
EndIf
EndFunc   ;==>WM_CHANGECBCHAIN
; Handle WM_DRAWCLIPBOARD messages
Func WM_DRAWCLIPBOARD($hWnd, $iMsg, $iwParam, $ilParam)
local $j,$clip
If $j <= 9 Then
  $clip[$j] = _ClipBoard_GetData ()
  $j+=1
Else
  $j = 0
  $clip[$j] = _ClipBoard_GetData ()
  $j+=1
EndIf
;~  MsgBox(0,"",_ClipBoard_GetData () & @CRLF)
; Pass the message to the next viewer
If $hNext <> 0 Then _SendMessage ($hNext, $WM_DRAWCLIPBOARD, $iwParam, $ilParam)
EndFunc   ;==>WM_DRAWCLIPBOARD
Func ShowMsg()
$hGui2=GUICreate('', $iW, $iH,(@DesktopWidth-$iW)/2,(@DesktopHeight-$iH)/2,$WS_CAPTION+$WS_POPUP+$WS_SYSMENU,$WS_EX_TOPMOST)
GUISetIcon("C:test2WebexConnect.ico")
GUISetBkColor(0xff0001, $hGui2)
$Label11 = GUICtrlCreateLabel("", 0, 0, $iW/2+50,20)
$Label12 = GUICtrlCreateLabel("", $iW/2, 0, $iW/2,20)
$Label21 = GUICtrlCreateLabel("", 0, 20,  $iW/2,20)
$Label22 = GUICtrlCreateLabel("", $iW/2, 20, $iW/2,20)
$Label31 = GUICtrlCreateLabel("", 0, 40, $iW/2+50,20)
$Label32 = GUICtrlCreateLabel("", $iW/2, 40, $iW/2,20)
$Label41 = GUICtrlCreateLabel("", 0, 60,  $iW/2,20)
$Label42 = GUICtrlCreateLabel("", $iW/2, 60, $iW/2,20)
$Label51 = GUICtrlCreateLabel("", 0, 80, $iW/2+50,20)
$Label52 = GUICtrlCreateLabel("", $iW/2, 80, $iW/2,20)
$Label61 = GUICtrlCreateLabel("", 0, 100,  $iW/2,20)
$Label62 = GUICtrlCreateLabel("", $iW/2, 100, $iW/2,20)
$Label71 = GUICtrlCreateLabel("", 0, 120,  $iW/2,20)
$Label72 = GUICtrlCreateLabel("", $iW/2, 120, $iW/2,20)
$Exitbutton = GUICtrlCreateButton("Exit", 0, $iH-30, $iW,28)
GUICtrlSetFont($Label11, 10, 700)
GUICtrlSetFont($Label12, 10, 700)
GUICtrlSetFont($Label21, 10, 700)
GUICtrlSetFont($Label22, 10, 700)
GUICtrlSetFont($Label31, 10, 700)
GUICtrlSetFont($Label32, 10, 700)
GUICtrlSetFont($Label41, 10, 700)
GUICtrlSetFont($Label42, 10, 700)
GUICtrlSetFont($Label51, 10, 700)
GUICtrlSetFont($Label52, 10, 700)
GUICtrlSetFont($Label61, 10, 700)
GUICtrlSetFont($Label62, 10, 700)
GUICtrlSetFont($Label71, 10, 700)
GUICtrlSetFont($Label72, 10, 700)
GUICtrlSetBkColor($Label11,0xBFCFFF)
GUICtrlSetBkColor($Label12,0xBFCFFF)
GUICtrlSetBkColor($Label21,0xBFCFFF)
GUICtrlSetBkColor($Label22,0xBFCFFF)
GUICtrlSetBkColor($Label31,0xBFCFFF)
GUICtrlSetBkColor($Label32,0xBFCFFF)
GUICtrlSetBkColor($Label41,0xBFCFFF)
GUICtrlSetBkColor($Label42,0xBFCFFF)
GUICtrlSetBkColor($Label51,0xBFCFFF)
GUICtrlSetBkColor($Label52,0xBFCFFF)
GUICtrlSetBkColor($Label61,0xBFCFFF)
GUICtrlSetBkColor($Label62,0xBFCFFF)
GUICtrlSetBkColor($Label71,0xBFCFFF)
GUICtrlSetBkColor($Label72,0xBFCFFF)
GUICtrlSetData($Label11,"User Name is:")
GUICtrlSetData($Label12,1)
GUICtrlSetData($Label21,"Phone Number:")
GUICtrlSetData($Label22,2)
GUICtrlSetData($Label31,"Location:")
GUICtrlSetData($Label32,3)
GUICtrlSetData($Label41,"Department:")
GUICtrlSetData($Label42,4)
GUICtrlSetData($Label51,"Function:")
GUICtrlSetData($Label52,5)
GUICtrlSetData($Label61,"Line Manager:")
GUICtrlSetData($Label62,6)
GUICtrlSetData($Label71,"You have typed:")
GUICtrlSetData($Label72,7)
GUISetState()
EndFunc

Share this post


Link to post
Share on other sites

Juvigy,

The reprodicer is not a good one - it works as intended

Does it?

After I added the includes and a case statement following the traygetmsg() it worked. It is doing exactly what you are telling it to do when you action the exit button in $hgui2.

Modified code

#include <GUIConstantsEx.au3>
#include <Clipboard.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>

Global $result, $users; , $FilePath = "C:File.xlsm"
Global $hGui2, $but, $Label, $iW = 500, $iH = 230, $test2, $Exitbutton
Opt("TrayMenuMode", 1)
$aboutitem = TrayCreateItem("About")
TrayCreateItem("")
$lastitem = TrayCreateItem("Last")
TrayCreateItem("")
$exititem = TrayCreateItem("Exit")
TraySetState()
TraySetToolTip("VIPMaster 1.0")
TraySetIcon("Shell32.dll", -18)
$hGUI3 = GUICreate("Clipboard", 10, 10)
GUISetState(@SW_HIDE)
; Initialize clipboard viewer
$hNext = _ClipBoard_SetViewer($hGUI3)
GUIRegisterMsg($WM_CHANGECBCHAIN, "WM_CHANGECBCHAIN")
GUIRegisterMsg($WM_DRAWCLIPBOARD, "WM_DRAWCLIPBOARD")
ShowMsg()
While 1
    $msg = TrayGetMsg()
    switch $msg
        case $exititem
            Exit
    endswitch

    $aMsg = GUIGetMsg(1) ; Use advanced parameter to get an array returned
    Switch $aMsg[1] ; First check which GUI sent the message
        Case $hGui2
            Switch $aMsg[0] ; Now check for the messages sent from $hGui2
                Case $GUI_EVENT_CLOSE
                    GUIDelete($hGui2)
                Case $Exitbutton
                    GUIDelete($hGui2)
                    ConsoleWrite($Exitbutton & @CRLF)
            EndSwitch
    EndSwitch
WEnd
Exit
Func WM_CHANGECBCHAIN($hWnd, $iMsg, $iwParam, $ilParam)
    ; If the next window is closing, repair the chain
    If $iwParam = $hNext Then
        $hNext = $ilParam
        ; Otherwise pass the message to the next viewer
    ElseIf $hNext <> 0 Then
        _SendMessage($hNext, $WM_CHANGECBCHAIN, $iwParam, $ilParam, 0, "hwnd", "hwnd")
    EndIf
EndFunc   ;==>WM_CHANGECBCHAIN
; Handle WM_DRAWCLIPBOARD messages
Func WM_DRAWCLIPBOARD($hWnd, $iMsg, $iwParam, $ilParam)
    Local $j, $clip
    If $j <= 9 Then
        $clip[$j] = _ClipBoard_GetData()
        $j += 1
    Else
        $j = 0
        $clip[$j] = _ClipBoard_GetData()
        $j += 1
    EndIf
;~  MsgBox(0,"",_ClipBoard_GetData () & @CRLF)
    ; Pass the message to the next viewer
    If $hNext <> 0 Then _SendMessage($hNext, $WM_DRAWCLIPBOARD, $iwParam, $ilParam)
EndFunc   ;==>WM_DRAWCLIPBOARD
Func ShowMsg()
    $hGui2 = GUICreate('', $iW, $iH, (@DesktopWidth - $iW) / 2, (@DesktopHeight - $iH) / 2, $WS_CAPTION + $WS_POPUP + $WS_SYSMENU, $WS_EX_TOPMOST)
    GUISetIcon("C:test2WebexConnect.ico")
    GUISetBkColor(0xff0001, $hGui2)
    $Label11 = GUICtrlCreateLabel("", 0, 0, $iW / 2 + 50, 20)
    $Label12 = GUICtrlCreateLabel("", $iW / 2, 0, $iW / 2, 20)
    $Label21 = GUICtrlCreateLabel("", 0, 20, $iW / 2, 20)
    $Label22 = GUICtrlCreateLabel("", $iW / 2, 20, $iW / 2, 20)
    $Label31 = GUICtrlCreateLabel("", 0, 40, $iW / 2 + 50, 20)
    $Label32 = GUICtrlCreateLabel("", $iW / 2, 40, $iW / 2, 20)
    $Label41 = GUICtrlCreateLabel("", 0, 60, $iW / 2, 20)
    $Label42 = GUICtrlCreateLabel("", $iW / 2, 60, $iW / 2, 20)
    $Label51 = GUICtrlCreateLabel("", 0, 80, $iW / 2 + 50, 20)
    $Label52 = GUICtrlCreateLabel("", $iW / 2, 80, $iW / 2, 20)
    $Label61 = GUICtrlCreateLabel("", 0, 100, $iW / 2, 20)
    $Label62 = GUICtrlCreateLabel("", $iW / 2, 100, $iW / 2, 20)
    $Label71 = GUICtrlCreateLabel("", 0, 120, $iW / 2, 20)
    $Label72 = GUICtrlCreateLabel("", $iW / 2, 120, $iW / 2, 20)
    $Exitbutton = GUICtrlCreateButton("Exit", 0, $iH - 30, $iW, 28)
    GUICtrlSetFont($Label11, 10, 700)
    GUICtrlSetFont($Label12, 10, 700)
    GUICtrlSetFont($Label21, 10, 700)
    GUICtrlSetFont($Label22, 10, 700)
    GUICtrlSetFont($Label31, 10, 700)
    GUICtrlSetFont($Label32, 10, 700)
    GUICtrlSetFont($Label41, 10, 700)
    GUICtrlSetFont($Label42, 10, 700)
    GUICtrlSetFont($Label51, 10, 700)
    GUICtrlSetFont($Label52, 10, 700)
    GUICtrlSetFont($Label61, 10, 700)
    GUICtrlSetFont($Label62, 10, 700)
    GUICtrlSetFont($Label71, 10, 700)
    GUICtrlSetFont($Label72, 10, 700)
    GUICtrlSetBkColor($Label11, 0xBFCFFF)
    GUICtrlSetBkColor($Label12, 0xBFCFFF)
    GUICtrlSetBkColor($Label21, 0xBFCFFF)
    GUICtrlSetBkColor($Label22, 0xBFCFFF)
    GUICtrlSetBkColor($Label31, 0xBFCFFF)
    GUICtrlSetBkColor($Label32, 0xBFCFFF)
    GUICtrlSetBkColor($Label41, 0xBFCFFF)
    GUICtrlSetBkColor($Label42, 0xBFCFFF)
    GUICtrlSetBkColor($Label51, 0xBFCFFF)
    GUICtrlSetBkColor($Label52, 0xBFCFFF)
    GUICtrlSetBkColor($Label61, 0xBFCFFF)
    GUICtrlSetBkColor($Label62, 0xBFCFFF)
    GUICtrlSetBkColor($Label71, 0xBFCFFF)
    GUICtrlSetBkColor($Label72, 0xBFCFFF)
    GUICtrlSetData($Label11, "User Name is:")
    GUICtrlSetData($Label12, 1)
    GUICtrlSetData($Label21, "Phone Number:")
    GUICtrlSetData($Label22, 2)
    GUICtrlSetData($Label31, "Location:")
    GUICtrlSetData($Label32, 3)
    GUICtrlSetData($Label41, "Department:")
    GUICtrlSetData($Label42, 4)
    GUICtrlSetData($Label51, "Function:")
    GUICtrlSetData($Label52, 5)
    GUICtrlSetData($Label61, "Line Manager:")
    GUICtrlSetData($Label62, 6)
    GUICtrlSetData($Label71, "You have typed:")
    GUICtrlSetData($Label72, 7)
    GUISetState()
EndFunc   ;==>ShowMsg

You are not making anyone terribly anxious to help you when you ignore simple advice like this

You should know by now that when posting code use the "[autoit][/autoit]" tags.

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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