Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/17/2013 in all areas

  1. Have you had any of the following problems when trying to identify controls in a .NET app: - the control ClassNameNN changes often - cannot obtain any information that uniquely identifies the control Often times, we are stuck trying to identify them using less than robust means. Fortunately, there is the WM_GETCONTROLNAME message. Using this, one can identify a .NET control by the name given by the developer at design time ( or given at run-time ). Attached is a port to AutoIT from a C++ example posted here. NET_DumpAllControlNames will dump all control names for a given .NET Windows Form. NET_ControlGetHandleByName will provide a handle for a given control name on a Windows Form Example: #include <DotNetIdentification.au3> ; "Test App" is a fictitous application that contains a control named "txtShowMe". $WindowName = "Test App" $WindowText = "" $control = NET_ControlGetHandleByName( $WindowName, $WindowText, "txtShowMe" ) if @error = 0 then WinActivate( $WindowName, $WindowText ) ControlFocus( $WindowName, $WindowText, $control ) endif NOTE: - Not all .NET controls have unique names assigned to them. - Also, this will NOT provide access to cells in a .NET Data Grid. For those, take a look at MS Active Accessibility implemented in oleacc.dll and its AutoIT implementation here. - If you wish to discover the names of specific controls using a utility similar to the AutoItInfo tool, check out Managed Spy or Ranorex Spy. TODO: - Break out Setup and Cleanup into distinct functions - Fill out error handling - Once registering OnAutoITExit functions is implemented, cleanup on errors DotNetIdentification.au3
    1 point
  2. Tapes

    Comparing Arrays

    This worked amazingly! Thank you so much Melba!!!
    1 point
  3. Attckdog, As if we would.... As long as this thread remains limited to its current scope I am happy for it to remain open. M23
    1 point
  4. Is this what you are looking for? ;coded by UEZ 2013-07-17 #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> Opt("MustDeclareVars", 1) Global Const $STM_SETIMAGE = 0x0172, $tagGDIPCOLORMATRIX = "float m[25];", $IMAGE_BITMAP = 0 _GDIPlus_Startup() Global Const $sFile = "RedSquare.jpg" Global Const $hBitmap = _GDIPlus_BitmapCreateFromFile($sFile) Global Const $iW = _GDIPlus_ImageGetWidth($hBitmap) Global Const $iH = _GDIPlus_ImageGetHeight($hBitmap) Global Const $hGUI = GUICreate("Test", 400, 400, -1, -1, $WS_POPUP) GUISetBkColor(0xFFFF00) Global Const $iPic = GUICtrlCreatePic("", 50, 50, 300, 300) GUICtrlSetState(-1, $GUI_DISABLE) Global $hHBitmap = _GDIPlus_FlipTransparencyGradient($hBitmap, 300, 300, 0xFF) Global $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap) If $hB Then _WinAPI_DeleteObject($hB) GUISetState() Sleep(2000) $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, 0) ;delete the image (useful for transparent images) If $hB Then _WinAPI_DeleteObject($hB) _WinAPI_DeleteObject($hBitmap) $hHBitmap = _GDIPlus_FlipTransparencyGradient($hBitmap, 300, 300) Global $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap) If $hB Then _WinAPI_DeleteObject($hB) Do If GUIGetMsg() = $GUI_EVENT_CLOSE Then _WinAPI_DeleteObject($hHBitmap) _GDIPlus_BitmapDispose($hBitmap) GUIDelete() _GDIPlus_Shutdown() Exit EndIf Until False Func _GDIPlus_FlipTransparencyGradient($hBitmap, $iNewW, $iNewH, $iTrans = 0x60, $iRotateFlipType = 2, $iStartColor = 0x80FF0000, $iEndColor = 0x00000000, $bConvert2HBmp = True); coded by UEZ 2013 Local $hBmp = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iNewW, "int", $iNewH, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0) $hBmp = $hBmp[6] Local $hGfxContext = _GDIPlus_ImageGetGraphicsContext($hBmp) Local $hBrush = _GDIPlus_LineBrushCreate($iNewW / 2, 0, $iNewW / 2, $iNewH, $iStartColor, $iEndColor) _GDIPlus_GraphicsFillRect($hGfxContext, 0, 0, $iNewW, $iNewH, $hBrush) DllCall($ghGDIPDll, "uint", "GdipImageRotateFlip", "handle", $hBitmap, "int", $iRotateFlipType) Local $fTransparency = -1 + $iTrans / 256 Local $hAttribute_Alpha = _GDIPlus_ImageAttributesCreate() Local $tColorMatrix = _GDIPlus_ColorMatrixCreateTranslate(0, 0, 0, $fTransparency) Local $pColorMatrix = DllStructGetPtr($tColorMatrix) _GDIPlus_ImageAttributesSetColorMatrix($hAttribute_Alpha, 0, True, $pColorMatrix) _GDIPlus_GraphicsDrawImageRectRectIA($hGfxContext, $hBitmap, 0, 0, _GDIPlus_ImageGetWidth($hBitmap) , _GDIPlus_ImageGetHeight($hBitmap), 0, 0, $iNewW, $iNewH, $hAttribute_Alpha) _GDIPlus_ImageAttributesDispose($hAttribute_Alpha) _GDIPlus_GraphicsDispose($hGfxContext) If $bConvert2HBmp Then Local $hHBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBmp) _GDIPlus_BitmapDispose($hBmp) Return $hHBmp EndIf Return $hBmp EndFunc Func _GDIPlus_ColorMatrixCreate() Return _GDIPlus_ColorMatrixCreateScale(1, 1, 1, 1) EndFunc ;==>_GDIPlus_ColorMatrixCreate Func _GDIPlus_ColorMatrixCreateScale($nRed, $nGreen, $nBlue, $nAlpha = 1) Local $tCM $tCM = DllStructCreate($tagGDIPCOLORMATRIX) DllStructSetData($tCM, "m", $nRed, 1) DllStructSetData($tCM, "m", $nGreen, 7) DllStructSetData($tCM, "m", $nBlue, 13) DllStructSetData($tCM, "m", $nAlpha, 19) DllStructSetData($tCM, "m", 1, 25) Return $tCM EndFunc ;==>_GDIPlus_ColorMatrixCreateScale Func _GDIPlus_ColorMatrixCreateTranslate($nRed, $nGreen, $nBlue, $nAlpha = 0) Local $iI, $tCM, $aFactors[4] = [$nRed, $nGreen, $nBlue, $nAlpha] $tCM = _GDIPlus_ColorMatrixCreate() For $iI = 0 To 3 DllStructSetData($tCM, "m", $aFactors[$iI], 21 + $iI) Next Return $tCM EndFunc ;==>_GDIPlus_ColorMatrixCreateTranslate Func _GDIPlus_GraphicsDrawImageRectRectIA($hGraphics, $hImage, $nSrcX, $nSrcY, $nSrcWidth, $nSrcHeight, $nDstX, $nDstY, $nDstWidth, $nDstHeight, $hImageAttributes = 0, $iUnit = 2) Local $aResult = DllCall($ghGDIPDll, "int", "GdipDrawImageRectRect", "handle", $hGraphics, "handle", $hImage, "float", $nDstX, "float", $nDstY, "float", $nDstWidth, "float", $nDstHeight, "float", $nSrcX, "float", $nSrcY, "float", $nSrcWidth, "float", $nSrcHeight, "int", $iUnit, "handle", $hImageAttributes, "int", 0, "int", 0) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] = 0 EndFunc ;==>_GDIPlus_GraphicsDrawImageRectRectIA Func _GDIPlus_ImageAttributesCreate() Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateImageAttributes", "int*", 0) If @error Then Return SetError(@error, @extended, 0) Return $aResult[1] EndFunc ;==>_GDIPlus_ImageAttributesCreate Func _GDIPlus_ImageAttributesDispose($hImageAttributes) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipDisposeImageAttributes", "handle", $hImageAttributes) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] = 0 EndFunc ;==>_GDIPlus_ImageAttributesDispose Func _GDIPlus_ImageAttributesSetColorMatrix($hImageAttributes, $iColorAdjustType = 0, $fEnable = False, $pClrMatrix = 0, $pGrayMatrix = 0, $iColorMatrixFlags = 0) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetImageAttributesColorMatrix", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $fEnable, "ptr", $pClrMatrix, "ptr", $pGrayMatrix, "int", $iColorMatrixFlags) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] = 0 EndFunc ;==>_GDIPlus_ImageAttributesSetColorMatrix Func _GDIPlus_LineBrushCreate($nX1, $nY1, $nX2, $nY2, $iARGBClr1, $iARGBClr2, $iWrapMode = 0) Local $tPointF1, $pPointF1 Local $tPointF2, $pPointF2 Local $aResult $tPointF1 = DllStructCreate("float;float") $pPointF1 = DllStructGetPtr($tPointF1) $tPointF2 = DllStructCreate("float;float") $pPointF2 = DllStructGetPtr($tPointF2) DllStructSetData($tPointF1, 1, $nX1) DllStructSetData($tPointF1, 2, $nY1) DllStructSetData($tPointF2, 1, $nX2) DllStructSetData($tPointF2, 2, $nY2) $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", $iARGBClr1, "uint", $iARGBClr2, "int", $iWrapMode, "int*", 0) If @error Then Return SetError(@error, @extended, 0) Return $aResult[6] EndFunc ;==>_GDIPlus_LineBrushCreate To do: error handling. Br, UEZ
    1 point
  5. Can you add a _IELoadWait at the end of the loop and try again? $o_form = _IEFormGetObjByName($oIE, "_ctl0");Form1 $o_btnSair = _IEFormElementGetObjByName($o_form, "btnSair") $o_btnSair.click _IELoadWait($oIE) ; <== Add this
    1 point
  6. If it's a folder on the root of C: then it's not DirCreate, it's Windows 7, that's a protected area.
    1 point
  7. UEZ

    Help with BitBlt

    You forgot to create the bitmap where you draw your graphics. #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Global Const $Width = 100, $Height = 100 Global $Left = 50, $Top = 50 Global $hwnd, $hDCDest, $hDCSource, $hPenLil, $hPenFat, $hBrush, $hHBitmap Main() Func Main() ; GUI & GDI handles $hwnd = GUICreate("BitBlt Test", 300, 300) GUISetState(@SW_SHOW, $hwnd) $hDCDest = _WinAPI_GetDC($hwnd) $hDCSource = _WinAPI_CreateCompatibleDC($hDCDest) $hHBitmap = _WinAPI_CreateSolidBitmap($hwnd, 0, 300, 300) _WinAPI_SelectObject($hDCSource, $hHBitmap) $hPenLil = _WinAPI_CreatePen($PS_SOLID, 1, 0xFFFFFF) $hPenFat = _WinAPI_CreatePen($PS_SOLID, 3, 0x00FF00) $hBrush = _WinAPI_CreateSolidBrush(0xFFFFFF) ; Fill white rectangle Local $tRect = DllStructCreate($tagRect) DllStructSetData($tRect, "Left", $Left) DllStructSetData($tRect, "Top", $Top) DllStructSetData($tRect, "Right", $Left + $Width) DllStructSetData($tRect, "Bottom", $Top + $Height) _WinAPI_SelectObject($hDCSource, $hBrush) _WinAPI_FillRect($hDCSource, $tRect, $hBrush) ; Thick green outline _WinAPI_SelectObject($hDCSource, $hPenFat) _WinAPI_MoveTo($hDCSource, $Left, $Top) _WinAPI_LineTo($hDCSource, $Left + $Width, $Top) _WinAPI_LineTo($hDCSource, $Left + $Width, $Top + $Height) _WinAPI_LineTo($hDCSource, $Left, $Top + $Height) _WinAPI_LineTo($hDCSource, $Left, $Top) ; Thin black outline _WinAPI_SelectObject($hDCSource, $hPenLil) _WinAPI_MoveTo($hDCSource, $Left, $Top) _WinAPI_LineTo($hDCSource, $Left + $Width, $Top) _WinAPI_LineTo($hDCSource, $Left + $Width, $Top + $Height) _WinAPI_LineTo($hDCSource, $Left, $Top + $Height) _WinAPI_LineTo($hDCSource, $Left, $Top) GUIRegisterMsg($WM_PAINT, "WM_PAINT") _WinAPI_RedrawWindow($hwnd, 0, 0, $RDW_INVALIDATE + $RDW_UPDATENOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Quit() Case $GUI_EVENT_RESTORE _WinAPI_RedrawWindow($hwnd, 0, 0, $RDW_INVALIDATE + $RDW_UPDATENOW) EndSwitch WEnd EndFunc Func WM_PAINT() ; _WinAPI_BitBlt($hDCDest, $Left, $Top, $Width, $Height, $hDCSource, $Left, $Top, $BLACKNESS) ; Works _WinAPI_BitBlt($hDCDest, $Left, $Top, $Width, $Height, $hDCSource, $Left, $Top, $SRCCOPY) ; Doesn't work EndFunc Func Quit() _WinAPI_ReleaseDC($hwnd, $hDCDest) _WinAPI_DeleteDC($hDCSource) _WinAPI_DeleteObject($hHBitmap) _WinAPI_DeleteObject($hBrush) _WinAPI_DeleteObject($hPenLil) _WinAPI_DeleteObject($hPenFat) GUIDelete($hwnd) Exit EndFunc Br, UEZ
    1 point
  8. FireFox

    Update listbox data

    Hi, Try this, it can be improved. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIListBox.au3> #include <Array.au3> Global $sLastCountryCodeList = "" Global $Hostname, $CountryCode, $StoreID, $StoreIDData $MainForm = GUICreate("Hostname", 349, 184) $HostnameInput = GUICtrlCreateInput("", 40, 24, 125, 21) $CountryCodeList = GUICtrlCreateList("", 40, 56, 50, 87) ; 1st Combo GUICtrlSetData(-1, "BGR|ESP|FFM|GBR|ITA|POL|RUS", "FFM") ; Add alternatives and set default $StoreIDList = GUICtrlCreateList("", 104, 56, 60, 87, $LBS_EXTENDEDSEL) ; 2nd Combo ; GUICtrlSetData(-1, $StoreIDData) ; Add alternatives and set default GUISetState(@SW_SHOW, $MainForm) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") Func StoreData() $sCountryCodeList = GUICtrlRead($CountryCodeList) If $sCountryCodeList = $sLastCountryCodeList Then Return 0 GUICtrlSetData($StoreIDList, "") Switch $sCountryCodeList Case "BGR" $StoreIDData = "10|11|15|16|18|21" GUICtrlSetData($StoreIDList, $StoreIDData) GUICtrlSetData($HostnameInput, $CountryCode & GUICtrlRead($StoreIDList)) Case "ESP" $StoreIDData = "1|2|3|5|9|12|14|18|22|23" GUICtrlSetData($StoreIDList, $StoreIDData) GUICtrlSetData($HostnameInput, $CountryCode & GUICtrlRead($StoreIDList)) Case "FFM" $StoreIDData = "0" GUICtrlSetData($HostnameInput, $CountryCode & GUICtrlRead($StoreIDList)) Case "GBR" $StoreIDData = "1|2|3|4|5|6|7|8|9|10|11|12" GUICtrlSetData($StoreIDList, $StoreIDData) GUICtrlSetData($HostnameInput, $CountryCode & GUICtrlRead($StoreIDList)) Case "ITA" $StoreIDData = "10|11|12|13|14|15|16|17|18" GUICtrlSetData($StoreIDList, $StoreIDData) GUICtrlSetData($HostnameInput, $CountryCode & GUICtrlRead($StoreIDList)) Case "POL" $StoreIDData = "1|2|5|7|9|10|11|12|14|15|18" GUICtrlSetData($StoreIDList, $StoreIDData) GUICtrlSetData($HostnameInput, $CountryCode & GUICtrlRead($StoreIDList)) Case "RUS" $StoreIDData = "10|11|12|15|16|19|20|21|22|29|32" GUICtrlSetData($StoreIDList, $StoreIDData) GUICtrlSetData($HostnameInput, $CountryCode & GUICtrlRead($StoreIDList)) EndSwitch $sLastCountryCodeList = $sCountryCodeList EndFunc ;==>StoreData Func WM_COMMAND($hWnd, $iMsg, $iParam, $lParam) Local $iIDFrom = 0, $iCode = 0 $iIDFrom = BitAND($iParam, 0xFFFF) ; Low Word $iCode = BitShift($iParam, 16) ; Hi Word Switch $iIDFrom Case $StoreIDList Switch $iCode Case $LBN_SELCHANGE Local $aData = _GUICtrlListBox_GetSelItemsText($StoreIDList) GUICtrlSetData($HostnameInput, _ArrayToString($aData, ", ", 1)) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch StoreData() Sleep(10) WEnd
    1 point
  9. With the best wishes i wrote a script with autoit that can help you hiding your personal data. ;File Hider #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Dir=":\" $FilehideGui = GUICreate("File Hider", 287, 190, 193, 115) $lblDrivename= GUICtrlCreateLabel("Drive Name:", 16, 40, 60, 17);Drive name in which your Folder save that you want Hide. $lblFoldername = GUICtrlCreateLabel("Folder/File Name:", 16, 80, 95, 17);Folder name or file name that you want hide.if your,s specific folder is present in another folder you can write his name as(Folder\folder1\folder2\etc) $txtdrivename = GUICtrlCreateInput("", 112, 40, 153, 21) Dim $ES_PA,$ES_AU $txtFoldername = GUICtrlCreateInput("", 112, 80, 153, 21, BitOR($ES_PA,$ES_AU)) $btnOK = GUICtrlCreateButton("&Hide!", 200, 160, 75, 25, 0) $btnOK2 = GUICtrlCreateButton("&Show!", 120, 160, 75, 25, 0) $lblInfo3 = GUICtrlCreateLabel("AdnanBaloch", 10, 164, 110, 80) GUICtrlSetFont($lblInfo3, 12, 800) GUISetState(@SW_SHOW) While 1 $uMsg = GUIGetMsg() Switch $uMsg Case $btnOK $Drivename = GUICtrlRead($txtdrivename) If StringLen($Drivename)=0 Then MsgBox(64,"AdnanBaloch","Plese Enter Your Drivername.") Else $Foldername = GUICtrlRead($txtFoldername) If StringLen($Foldername)=0 Then MsgBox(64,"HM_LINK 03216592390","Plese Enter Your Folder or File name.") Else $Drivename = GUICtrlRead($txtDrivename) $Foldername = GUICtrlRead($txtFoldername) Run("CMD") Sleep(500) Send("attrib {+}s {+}h ") Send($Drivename&$Dir&$Foldername) Sleep(250) Send("{Enter}") Send("{Enter}") sleep(250) Send("exit") Send("{Enter}") ExitLoop EndIf EndIf Case $btnOK2 $Drivename = GUICtrlRead($txtdrivename) If StringLen($Drivename)=0 Then MsgBox(64,"AdnanBaloch","Plese Enter Your Drivername.") Else $Foldername = GUICtrlRead($txtFoldername) If StringLen($Foldername)=0 Then MsgBox(64,"HM_LINK 03216592390","Plese Enter Your Folder or File name.") Else $Drivename = GUICtrlRead($txtDrivename) $Foldername = GUICtrlRead($txtFoldername) Run("CMD") Sleep(500) Send("attrib {-}s {-}h ") Send($Drivename&$Dir&$Foldername) Sleep(250) Send("{Enter}") Send("{Enter}") sleep(250) Send("exit") Send("{Enter}") ExitLoop EndIf EndIf Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd GUISetState(@SW_HIDE) MsgBox(64,"Can you like me?","If you like this please give me a 'Like'On Post")
    1 point
  10. Thanks Busyman.........Welcome to autoit you are on best place.
    1 point
  11. Starstar

    secure you Script

    Ok no problem in be patient.........
    1 point
  12. Starstar

    secure you Script

    There is simple Script Friends after a lot of hard work.we are going to make it secure.our plane is that when the script will run it will get " HWID" in text file and save it in any partition and hide text file by cmd (attrib +h c:text.txt) now let $HWold ="Text.txt"$HWnew = text2.txt .If $HWold <> $HWnew then Erorr "you cannot use script.else ............................ when someone will copy script and past it in another computer.our Script will easily give error..........and script will not run firefox. #include <String.au3> $path = "D:\Hardwhere id.txt" $HWnew= _HWID() $HWold = $path MsgBox(64, "Haredwhere ID:", "Your HWID is: " &$HWnew, 3) GUICtrlRead($path) If StringLen($HWold) <> $HWnew Then MsgBox(64, "AdnanBaloch", "You are not allowed to use this tool", 3) Else $iPID = Shellexecute(@DesktopCommonDir & '\Mozilla Firefox.lnk');Mozilla Firefox will run if present. ConsoleWrite($iPID & "-" & @error & @CRLF) Exit EndIf Func _HWID() $osdrive = StringLeft(@SystemDir, 5) $original = "0"& @CPUArch & @KBLayout & DriveGetSerial("C:\") & StringUpper(DriveGetType($osdrive)) & DriveSpaceTotal ($osdrive) $string2 = StringMid($original, Round(StringLen($original)/2), Round(StringLen($original)/2)) $string2_mod = _StringToHex(_StringReverse($string2)) $original = _StringEncrypt(1, $original, $string2_mod, 1) Return $original EndFuncwork on it please.
    1 point
  13. i liked your googling FireFox.
    1 point
  14. Thanks Ksr000 thank u very much....
    1 point
  15. Some weeks ago I got the task to automatic create a lot of databases with the Access 2003 Source Code Control Add-in in a nightly build. First I use the AutoIt Functions like WinActivate and ControlClick. But many Controls in MS-Office, such the menubar (MsoCommandBar) or buttons (bosa_sdm_Mso96) are not visible to those commands. So I use many Send or ControlSend commands. Finally the Build runs not stable. After 10 or 30 minutes it blocks with unreproducible errors. Then I rewrite the scripts by use of the Microsoft Active Accessibility technology. Now I can address the MS-Office controls by name. I can click at a menu item by use of an object model. The problems are disappeared. I attached a library with some examples. For now I use a small COM-Wrapper for the Win-API Calls because the Win-API returns a COM-Object (IAccessible) in their parameter list and I canĀ“t implement that in AutoIt. May be someone out there have the knowledge to replace it with pure AutoIt Code. If you find it useful, please feel free to extend the library or the examples. Best Regards ActiveAccessibilityForMsOffice.zip
    1 point
  16. #include <GuiConstantsEx.au3> #include <GuiMonthCal.au3> #include <WindowsConstants.au3> #include <Constants.au3> Opt('MustDeclareVars', 1) $Debug_MC = False; Check ClassName being passed to MonthCal functions, set to True and use a handle to another control to see it work _ThemeLevel(1) Global $iMemo _Main() Func _Main() Local $hMonthCal ; Create GUI GUICreate("Month Calendar Set Color", 400, 300) $hMonthCal = GUICtrlCreateMonthCal("", 4, 4, -1, -1, $WS_BORDER, 0x00000000) ; Create memo control $iMemo = GUICtrlCreateEdit("", 4, 168, 392, 128, 0) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") GUISetState() ; Get/Set calendar color MemoWrite("Background: 0x" & Hex(_GUICtrlMonthCal_GetColor($hMonthCal, $MCSC_MONTHBK), 6)) _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_MONTHBK, $CLR_MONEYGREEN) MemoWrite("Background: 0x" & Hex(_GUICtrlMonthCal_GetColor($hMonthCal, $MCSC_MONTHBK), 6)) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main ; Write message to memo Func MemoWrite($sMessage) GUICtrlSetData($iMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite ; Functionality : ; just info about possibility to turn off theme-using in scripts/compiled-exe with using GUI stuff ; This info was produced by Holger Func _ThemeLevel($nFlag = 0) ; $nFlag = 0 ; Visual styles are completely disabled in the running script ; $nFlag = 1; Nonclient areas of the GUI can use visual styles ; $nFlag = 2; Controls can use visual styles (like Buttons, Progressbar, Group-ctrl's, etc.) ; $nFlag = 4; Web content displayed ??? (info from MSDN) can use visual styles ; ; These flags can be combined with BitOr(...) DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $nFlag) EndFunc ;==>_ThemeLevel
    1 point
  17. vtr

    "AfxWnd42s" Please Help

    This will most likely be too late for the original poster, but may help somebody searching the archives: dealing with another legacy application, i seem to be able to read the contents out of AfxWnd42s controls using textcapturex by Deskperience Software. i am still having problems reading the content out of those pesky Afx:400000:8:10013:b1010b and similar controls. Hth,
    1 point
×
×
  • Create New...