nacerbaaziz

Change the keyboard language in custom window

9 posts in this topic

Hi friends, I have a question, please.
I have created a window containing a edit box
I need to know how to change the keyboard language,
e.g :
if a user open the  script  it will be change the keyBord language   in window automatically into English
I found more examples but didn't work with me .
Note:  
 I use the windows 10 os
Please help me .
thanks in advance to all
with my Greetings and my appreciation for all users and admins

Share this post


Link to post
Share on other sites

Hi again.
Dear I have a query
Do I need the title of the window or window Handle
Thank you very much

Share this post


Link to post
Share on other sites
$hWnd = GUICreate() 
; Or
$hWnd = WinGetHandle()


_WinAPI_SetKeyboardLayout ( $hWnd, $iLanguage [, $iFlags = 0] )

;~  The input locale identifier $iLanguage:
;~ 0x0436 - Afrikaans
;~ 0x041C - Albanian
;~ 0x0401 - Arabic
;~ 0x1401 - Arabic Algeria
;~ 0x3C01 - Arabic Bahrain
;~ 0x0C01 - Arabic Egypt
;~ 0x0801 - Arabic Iraq
;~ 0x2C01 - Arabic Jordan
;~ 0x3401 - Arabic Kuwait
;~ 0x3001 - Arabic Lebanon
;~ 0x1001 - Arabic Libya
;~ 0x1801 - Arabic Morocco
;~ 0x2001 - Arabic Oman
;~ 0x4001 - Arabic Qatar
;~ 0x0401 - Arabic Saudi Arabia
;~ 0x2801 - Arabic Syria
;~ 0x1C01 - Arabic Tunisia
;~ 0x3801 - Arabic U.A.E
;~ 0x2401 - Arabic Yemen
;~ 0x042B - Armenian
;~ 0x044D - Assamese
;~ 0x082C - Azeri Cyrillic
;~ 0x042C - Azeri Latin
;~ 0x042D - Basque
;~ 0x0813 - Belgian Dutch
;~ 0x080C - Belgian French
;~ 0x0445 - Bengali
;~ 0x0416 - Portuguese (Brazil)
;~ 0x0402 - Bulgarian
;~ 0x0455 - Burmese
;~ 0x0423 - Byelorussian (Belarusian)
;~ 0x0403 - Catalan
;~ 0x0C04 - Chinese Hong Kong SAR
;~ 0x1404 - Chinese Macau SAR
;~ 0x0804 - Chinese Simplified
;~ 0x1004 - Chinese Singapore
;~ 0x0404 - Chinese Traditional
;~ 0x041A - Croatian
;~ 0x0405 - Czech
;~ 0x0406 - Danish
;~ 0x0413 - Dutch
;~ 0x0C09 - English Australia
;~ 0x2809 - English Belize
;~ 0x1009 - English Canadian
;~ 0x2409 - English Caribbean
;~ 0x1813 - English Ireland
;~ 0x2009 - English Jamaica
;~ 0x1409 - English New Zealand
;~ 0x3409 - English Philippines
;~ 0x1C09 - English South Africa
;~ 0x2C09 - English Trinidad
;~ 0x0809 - English U.K.
;~ 0x0409 - English U.S.
;~ 0x3009 - English Zimbabwe
;~ 0x0425 - Estonian
;~ 0x0438 - Faeroese
;~ 0x0429 - Farsi
;~ 0x040B - Finnish
;~ 0x040C - French
;~ 0x2C0C - French Cameroon
;~ 0x0C0C - French Canadian
;~ 0x300C - French Cote d'Ivoire
;~ 0x140C - French Luxembourg
;~ 0x340C - French Mali
;~ 0x180C - French Monaco
;~ 0x200C - French Reunion
;~ 0x280C - French Senegal
;~ 0x1C0C - French West Indies
;~ 0x240C - French Congo (DRC)
;~ 0x0462 - Frisian Netherlands
;~ 0x083C - Gaelic Ireland
;~ 0x043C - Gaelic Scotland
;~ 0x0456 - Galician
;~ 0x0437 - Georgian
;~ 0x0407 - German
;~ 0x0C07 - German Austria
;~ 0x1407 - German Liechtenstein
;~ 0x1007 - German Luxembourg
;~ 0x0408 - Greek
;~ 0x0447 - Gujarati
;~ 0x040D - Hebrew
;~ 0x0439 - Hindi
;~ 0x040E - Hungarian
;~ 0x040F - Icelandic
;~ 0x0421 - Indonesian
;~ 0x0410 - Italian
;~ 0x0411 - Japanese
;~ 0x044B - Kannada
;~ 0x0460 - Kashmiri
;~ 0x043F - Kazakh
;~ 0x0453 - Khmer
;~ 0x0440 - Kirghiz
;~ 0x0457 - Konkani
;~ 0x0412 - Korean
;~ 0x0454 - Lao
;~ 0x0426 - Latvian
;~ 0x0427 - Lithuanian
;~ 0x042F - FYRO Macedonian
;~ 0x044C - Malayalam
;~ 0x083E - Malay Brunei Darussalam
;~ 0x043E - Malaysian
;~ 0x043A - Maltese
;~ 0x0458 - Manipuri
;~ 0x044E - Marathi
;~ 0x0450 - Mongolian
;~ 0x0461 - Nepali
;~ 0x0414 - Norwegian Bokmol
;~ 0x0814 - Norwegian Nynorsk
;~ 0x0448 - Oriya
;~ 0x0415 - Polish
;~ 0x0816 - Portuguese
;~ 0x0446 - Punjabi
;~ 0x0417 - Rhaeto-Romanic
;~ 0x0418 - Romanian
;~ 0x0818 - Romanian Moldova
;~ 0x0419 - Russian
;~ 0x0819 - Russian Moldova
;~ 0x043B - Sami Lappish
;~ 0x044F - Sanskrit
;~ 0x0C1A - Serbian Cyrillic
;~ 0x081A - Serbian Latin
;~ 0x0430 - Sesotho
;~ 0x0459 - Sindhi
;~ 0x041B - Slovak
;~ 0x0424 - Slovenian
;~ 0x042E - Sorbian
;~ 0x040A - Spanish (Traditional)
;~ 0x2C0A - Spanish Argentina
;~ 0x400A - Spanish Bolivia
;~ 0x340A - Spanish Chile
;~ 0x240A - Spanish Colombia
;~ 0x140A - Spanish Costa Rica
;~ 0x1C0A - Spanish Dominican Republic
;~ 0x300A - Spanish Ecuador
;~ 0x440A - Spanish El Salvador
;~ 0x100A - Spanish Guatemala
;~ 0x480A - Spanish Honduras
;~ 0x4C0A - Spanish Nicaragua
;~ 0x180A - Spanish Panama
;~ 0x3C0A - Spanish Paraguay
;~ 0x280A - Spanish Peru
;~ 0x500A - Spanish Puerto Rico
;~ 0x0C0A - Spanish Spain (Modern Sort)
;~ 0x380A - Spanish Uruguay
;~ 0x200A - Spanish Venezuela
;~ 0x0430 - Sutu
;~ 0x0441 - Swahili
;~ 0x041D - Swedish
;~ 0x081D - Swedish Finland
;~ 0x100C - Swiss French
;~ 0x0807 - Swiss German
;~ 0x0810 - Swiss Italian
;~ 0x0428 - Tajik
;~ 0x0449 - Tamil
;~ 0x0444 - Tatar
;~ 0x044A - Telugu
;~ 0x041E - Thai
;~ 0x0451 - Tibetan
;~ 0x0431 - Tsonga
;~ 0x0432 - Tswana
;~ 0x041F - Turkish
;~ 0x0442 - Turkmen
;~ 0x0422 - Ukrainian
;~ 0x0420 - Urdu
;~ 0x0843 - Uzbek Cyrillic
;~ 0x0443 - Uzbek Latin
;~ 0x0433 - Venda
;~ 0x042A - Vietnamese
;~ 0x0452 - Welsh
;~ 0x0434 - Xhosa
;~ 0x0435 - Zulu

 


Regards,
 

Share this post


Link to post
Share on other sites

Hi
I tried and it didn't work with me
can you help me to set the keybord language to the english if i open this script
please

 

 

local $HWND = GUICreate("english to arabic translator", 400, 400)
GUICtrlCreateLabel("Write the English text here: ", 50, 10, 150, 60)
local $Input = GUICtrlCreateInput("", 50, 30, 200, 60)
local $Translate = GUICtrlCreateButton("&Translate", 0, 100, 50, 50, 0x01)
local $exit = GUICtrlCreateButton("&exit", 100, 100, 50, 50)


GUISetState(@sw_show, $HWND)
while 1
switch GUIGetMSG()
case $exit
exit
EndSwitch
Wend

Share this post


Link to post
Share on other sites

Sample scripts (Bing Translator API) for English to Arabic OR Any lanuage to Arabic Translator :

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPISys.au3>

#Region ### START GUI section ### Form=
Global $hWnd = GUICreate("English to Arabic Translator", 630, 162, -1, -1)
GUICtrlCreateLabel("Write the English text here:", 10, 2, 246, 17)
Global $eInput = GUICtrlCreateEdit("", 8, 25, 250, 100, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL))
GUICtrlSetData(-1, "Language text!")
GUICtrlCreateLabel("وقد ترجم النص إلى العربية:", 368, 2, 252, 17, $SS_RIGHT, $WS_EX_LAYOUTRTL)
Global $eOutput = GUICtrlCreateEdit("", 368, 25, 250, 100, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL), $WS_EX_LAYOUTRTL)
GUICtrlSetData(-1, "")
Global $bTranslate = GUICtrlCreateButton("Translate/ترجمه", 268, 25, 88, 50, $BS_DEFPUSHBUTTON)
Global $bCopy = GUICtrlCreateButton("Copy/نسخ", 268, 88, 88, 33)
Global $labStatus = GUICtrlCreateLabel("Ready!", 10, 134, 608, 21)

GUISetState(@SW_SHOW)
#EndRegion ### START GUI section ### Form=

Global Const $iLanguage = 0x0409
_WinAPI_SetKeyboardLayout($hWnd, $iLanguage)

Global $sTextToTranslated, $sTextTranslatedToArabic

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $bCopy
            $sTextToTranslated = GUICtrlRead($eOutput)
            MsgBox(64, "Copy to clipboard", ClipPut($sTextToTranslated) ? "Text translated has copy to Cliboard" : "Copy to Cliboard ERROR", Default, $hWnd)
        Case $bTranslate
            GUICtrlSetData($labStatus, "Translating...")

            GUICtrlSetData($eOutput, "")
            $sTextToTranslated = GUICtrlRead($eInput)
            $sTextTranslatedToArabic = _TranslateEnglishToArabic($sTextToTranslated)
            GUICtrlSetData($eOutput, $sTextTranslatedToArabic)

            GUICtrlSetData($labStatus, "Done!")
    EndSwitch
    Sleep(10)
WEnd

Func _TranslateEnglishToArabic($sEnglish = "")
    Local $sTranslated = BingTranslator($sEnglish, "en", "ar")
    Return $sTranslated
EndFunc   ;==>_TranslateEnglishToArabic

Func BingTranslator($sText, $sFrom = "auto", $sTo = "en")
    Local $sClient = "http://api.microsofttranslator.com/V2/Http.svc/"
    Local $appID = 'appId=68D088969D79A8B23AF8585CC83EBA2A05A97651'
    Local $Data = BinaryToString(StringToBinary($sText, 4))
    If $sFrom == "auto" Then
        $sFrom = InetRead($sClient & 'Detect?' & $appID & "&text=" & $Data, 3)
        $sFrom = StringRegExpReplace(BinaryToString($sFrom, 4), ".*>(.*)<.*", "$1")
    EndIf
    Local $Result = InetRead($sClient & 'Translate?' & $appID & "&from=" & $sFrom & "&to=" & $sTo & "&text=" & $Data, 3)
    $Result = StringRegExpReplace(BinaryToString($Result, 4), ".*>(.*)<.*", "$1")
    Return $Result
EndFunc   ;==>BingTranslator

 


Regards,
 

Share this post


Link to post
Share on other sites

I can not edit posts!
Forum fails with Arabic!

Script fixed:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPISys.au3>

#Region ### START GUI section ### Form=
Global $hWnd = GUICreate("English to Arabic Translator", 630, 162, -1, -1)
GUICtrlCreateLabel("Write the English text here:", 10, 2, 246, 17)
Global $eInput = GUICtrlCreateEdit("", 8, 25, 250, 100, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL))
GUICtrlSetData(-1, "Language text!")
GUICtrlCreateLabel("Arabic Text translated:", 368, 2, 252, 17, $SS_RIGHT)
Global $eOutput = GUICtrlCreateEdit("", 368, 25, 250, 100, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL), $WS_EX_LAYOUTRTL)
GUICtrlSetData(-1, "")
Global $bTranslate = GUICtrlCreateButton("Translate", 268, 25, 88, 50, $BS_DEFPUSHBUTTON)
Global $bCopy = GUICtrlCreateButton("Copy", 268, 88, 88, 33)
Global $labStatus = GUICtrlCreateLabel("Ready!", 10, 134, 608, 21)

GUISetState(@SW_SHOW)
#EndRegion ### START GUI section ### Form=

Global Const $iLanguage = 0x0409
_WinAPI_SetKeyboardLayout($hWnd, $iLanguage)

Global $sTextToTranslated, $sTextTranslatedToArabic

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $bCopy
            $sTextToTranslated = GUICtrlRead($eOutput)
            MsgBox(64, "Copy to clipboard", ClipPut($sTextToTranslated) ? "Text translated has copy to Cliboard" : "Copy to Cliboard ERROR", Default, $hWnd)
        Case $bTranslate
            GUICtrlSetData($labStatus, "Translating...")

            GUICtrlSetData($eOutput, "")
            $sTextToTranslated = GUICtrlRead($eInput)
            $sTextTranslatedToArabic = _TranslateEnglishToArabic($sTextToTranslated)
            GUICtrlSetData($eOutput, $sTextTranslatedToArabic)

            GUICtrlSetData($labStatus, "Done!")
    EndSwitch
    Sleep(10)
WEnd

Func _TranslateEnglishToArabic($sEnglish = "")
    Local $sTranslated = BingTranslator($sEnglish, "en", "ar")
    Return $sTranslated
EndFunc   ;==>_TranslateEnglishToArabic

Func BingTranslator($sText, $sFrom = "auto", $sTo = "en")
    Local $sClient = "http://api.microsofttranslator.com/V2/Http.svc/"
    Local $appID = 'appId=68D088969D79A8B23AF8585CC83EBA2A05A97651'
    Local $Data = BinaryToString(StringToBinary($sText, 4))
    If $sFrom == "auto" Then
        $sFrom = InetRead($sClient & 'Detect?' & $appID & "&text=" & $Data, 3)
        $sFrom = StringRegExpReplace(BinaryToString($sFrom, 4), ".*>(.*)<.*", "$1")
    EndIf
    Local $Result = InetRead($sClient & 'Translate?' & $appID & "&from=" & $sFrom & "&to=" & $sTo & "&text=" & $Data, 3)
    $Result = StringRegExpReplace(BinaryToString($Result, 4), ".*>(.*)<.*", "$1")
    Return $Result
EndFunc   ;==>BingTranslator

 


Regards,
 

Share this post


Link to post
Share on other sites

thank you very very very very much dear for the helpful responses

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

  • Similar Content

    • vyperhand
      By vyperhand
      I'm struggling to launch a VBS file via autoit using RunWait.  Due to the nature of the deployment tool I am using for said script, I only know that the .vbs files will be in the same directory as my AutoIt-generated .exe, but not what that path will be.  The path will look something like this:
      c:\programdata\vendor\lots\of\folders\randomnumber
      This is generated during deployment and I have no way of predicting the path - therefore, I am not sure how to call back to "same directory" in order to successfully launch the .vbs.
      This line is as close as I have gotten - this fires off the cmd window, but it closes immediately with out information, and the .vbs is not launched.
      RunWait (@ComSpec & " /c" & 'cscript.exe WORKPLEASE.vbs ALL /Q /NoCancel') I thought /c might be the problem, but leaving out the /c element causes me not to even see the momentary CMD window flash by.  Any help will be greatly appreciated, and thanks in advance.
    • Valnurat
      By Valnurat
      I have a ComboBox and I want, when I start writting in it, that it will show me what is the first in the list.
      Like, is I start writting:
      "pe" it  should show me "peter" if that is the first in the list.
      How can I do that?
       
      While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClos ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) Local $iIdx = _ArraySearch($aResult,$sComboRead,0,0,0,0,1,1) Local $aComputerOwner = _AD_GetObjectsInOU("OU=al,DC=AD,DC=AL,DC=ORG","(&(objectclass=computer)(managedby=" & $aResult[$iIdx][0] & "))",Default,"cn") _ArrayDelete($aComputerOwner,0) _GUICtrlListView_SetItemCount($idMylist,UBound($aComputerOwner)) If IsArray($aComputerOwner) Then For $i = 0 To UBound($aComputerOwner) - 1 GUICtrlCreateListViewItem($aComputerOwner[$i], $idMylist) Next Else GUICtrlSetData($idMylist, "No computer|") EndIf EndSwitch WEnd  
    • Valnurat
      By Valnurat
      Hi.
      I'm trying to add an array to my gui listview, but it fails with
      "C:\Program Files (x86)\AutoIt3\Include\GuiListView.au3" (473) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: DllStructSetData($tBuffer, "Text", $aItems[$iI][0]) DllStructSetData($tBuffer, "Text", ^ ERROR My code is:
      #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <WindowsConstants.au3> #include <ComboConstants.au3> #include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> #Include <AD.au3> #include <Array.au3> Opt('MustDeclareVars', 1) Global $aResult[0][2] Local $aNames[4] = ["DKSO","DKKO","SELU","SEES"] Local Const $iWidth = 300, $iHeight = 250, $iW = 85, $iH = 25 Local $hGUI = GUICreate("Find Computer Owner", $iWidth, $iHeight) ; Create a combobox control. Local $idComboBox = GUICtrlCreateCombo("", 2, 2, 296, 20, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $WS_VSCROLL, $CBS_SORT)) ;$WS_VSCROLL Local $idMylist = GUICtrlCreateListView("", 2, 114, 296, 100) Local $idClos = GUICtrlCreateButton("Close", ($iWidth - $iW) / 2, ($iHeight - $iH) - 7 , $iW, $iH) _AD_Open() Local $sFill = "" For $i = 0 to UBound($aNames) -1 Local $aUserInfo = _AD_GetObjectsInOU("OU=Al,DC=ad,DC=al,DC=org","(&(objectCategory=Person)(objectclass=user)(sAMAccountName=" & $aNames[$i] & "*))","","distinguishedName,cn") if @error Then MsgBox(0,@error,@extended) Exit EndIf For $x = $aUserInfo[0][0] To 1 Step -1 If $aUserInfo[$x][0] = "" Or StringInStr($aUserInfo[$x][0], "Resources") > 0 Or StringInStr($aUserInfo[$x][0], "Leavers") > 0 Or StringInStr($aUserInfo[$x][0], "Administration") > 0 Then _ArrayDelete($aUserInfo, $x) EndIf Next _ArrayConcatenate($aResult, $aUserInfo, 1) Next for $i = 0 To UBound($aResult) -1 If $aResult[$i][0] <> "" Then $sFill &= $aResult[$i][1] & "|" EndIf Next _ArrayDisplay($aResult, 'AD ' & UBound($aResult)) $sFill = StringTrimRight($sFill, 1) _GUICtrlComboBox_BeginUpdate($idComboBox) GUICtrlSetData($idComboBox, $sFill, "") _GUICtrlComboBox_EndUpdate($idComboBox) GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") _GUICtrlListView_AddColumn($idMylist, "Computername", 296) Local $sComboRead = "" ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClos ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) Local $iIdx = _ArraySearch($aResult,$sComboRead,0,0,0,0,1,1) Local $aComputerOwner = _AD_GetObjectsInOU("OU=al,DC=AD,DC=AL,DC=ORG","(&(objectclass=computer)(managedby=" & $aResult[$iIdx][0] & "))",Default,"cn") _ArrayDelete($aComputerOwner,0) _ArrayDisplay($aComputerOwner) _GUICtrlListView_SetItemCount($idMylist,UBound($aComputerOwner)) If IsArray($aComputerOwner) Then MsgBox(0,"Test",$sComboRead) _GUICtrlListView_AddArray($idMylist, $aComputerOwner) ; <---- it fails Else GUICtrlSetData($idMylist, "No computer|") EndIf EndSwitch WEnd _AD_Close() ; Delete the previous GUI and all controls. GUIDelete($hGUI) Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo ; Local $tBuffer $hWndListView = $idMylist If Not IsHWnd($idMylist) Then $hWndListView = GUICtrlGetHandle($idMylist) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint Do I do it wrong?
       
      Thank you in advanced.
    • ur
      By ur
      I am trying to identify the window based on the window title and text.
      The title will be the "erwin DM - filename"

      It is working till date, but some operating systems our application is displaying window as "erwin DM - [filename]"
       
      I tried  "erwin DM - *filename*" But this regular expression is not working.
      Any suggestion?
       
      $sModelFile = "C:\Users\Administrator\Documents\My Models\eMovies.erwin" $wdModel = _WinWaitActivate1("erwin DM - "&FileNameOnly($sModelFile),"") Func _WinWaitActivate1($title,$text,$timeout=0);Will Return the window Handler Logging("Waiting for "&$title&":"&$text) $dHandle = WinWait($title,$text,$timeout) if not ($dHandle = 0) then If Not WinActive($title,$text) Then WinActivate($title,$text) return WinWaitActive($title,$text,$timeout) Else Logging("Timeout occured while waiting for the window...") Exit EndIf EndFunc Func FileNameOnly($sFilePath) Local $sDrive = "", $sDir = "", $sFileName = "", $sExtension = "" Local $aPathSplit = _PathSplit($sFilePath, $sDrive, $sDir, $sFileName, $sExtension) ;_ArrayDisplay($aPathSplit, "_PathSplit of " & @ScriptFullPath) return $sFileName EndFunc  
    • Trisha
      By Trisha
      I tried (using AutoIt) to automate a scenario where i  have to open IE with specific URL on my extranet(Xen Desktop or Citrix ) ,from there i need to download  file and then through WinSCP; I  have to move that file to another location that can be access from my Local system using VMWare.
      I did as far as the above step. Now i want to navigate from my extranet to my local desktop system. But i am not able to move  from there.Mouse click is also not working.Please find the below screenshot highlighted in YELLOW.