= įunc WindowCallback($_hwnd, $iMsg, $wParam, $lParam) $edit1 = _WinAPI_CreateWindowEx(0, "edit", "text", BitOR($WS_VISIBLE, $WS_CHILD, $WS_VSCROLL, $ES_AUTOVSCROLL, $es_readOnly, $WS_TABSTOP), 5, 5, $WinWidth - 15, $WinHeight - 100, $hwnd) $btn1 = _WinAPI_CreateWindowEx(0, "button", "Open file. $hwnd = _WinAPI_CreateWindowEx($WS_EX_STATICEDGE, $WinClass, $WinTitle, BitOR($WS_OVERLAPPED,$WS_SYSMENU, $WS_MINIMIZEBOX, $WS_GROUP, $WS_DLGFRAME), $WinXPos, $WinYPos, $WinWidth, $WinHeight, 0) MsgBox(16, "Error", "Error while registering window class!") If $retVal = 0 Then If registerclass fails Local $retVal = _WinAPI_RegisterClassEx($WinClass, "WindowCallback", $WinIcon, 0, _WinAPI_GetSysColor($COLOR_BTNFACE), BitOR($CS_DEFAULTSTYLE, $CS_DROPSHADOW)) Small AutoIt Application that uses Windows APIĬonst $WinYPos = / 2) - ($WinHeight / 2)Ĭonst $WinTitle = "Win32 Application - Text reader"Ĭonst $WinIcon = _WinAPI_LoadIcon(_WinAPI_GetModuleHandle("shell32.dll"), 13) I found some examples in microsoft but it with cpp. I will tell you that all examples that i found in the internet with pdfs and Picture books. you will ask me why you didn't search the net for that? The screen readers for blind has some function that work with dialogs and others work with full windows styleĢ. Here i'll tell you that it as dialog and It is a little heavy in motion with screen readers. you will ask me why you don't use the GUICreate function Note: i need a local access keys and not a global hotkeysįinaly, before i will put the code here i must clarify a few things.ġ. Such as control+o enable the open button and control+f4 exit the app Secondly, i want to set some access keys linked with the window I already used the ws_tabStop but it did not work with me. I've searched a lot about how to use the _WinAPI_CreateWindowExīut i found some problem i hope you can help meįirstly, i want to set the controls focussable with the keyboard input Local $Return = DllCall($h_OpenFS, "boolean", "Wow64EnableWow64FsRedirection", "boolean", $b_Enabled) Local $h_OpenFS = DLLOpen("kernel32.dll") If msgBox(1, $i, $a_OutPutDism) = 1 then exitLoopįunc Wow64EnableWow64FsRedirection($b_Enabled) $a_OutPutDism = StringSplit($s_OutputDism, $i = 1 to $a_OutPutDism Local $i_Dism_Run = Run("DISM /online /english /get-features /format:table", "", BitOR($STDERR_CHILD, $STDOUT_CHILD)) I need just the list of features and there state It give me some results that i don't need to it e.g What i need is the list of features in 2d array Expand collapse popup #FUNCTION# = Name.: _SoundGetWaveVolume Description.: Returns app volume of script, Windows Vista, 7, 8, 10 only Syntax.: _SoundGetWaveVolume() Parameters.: $iValueOnError - Value to return when an error occurs Return values.: App volume of script or $iValueOnError at an error Error values.: = 1 - Unable to create Struct = 2 - Dll file not found = 3 - Wrong call so not on Windows Vista, 7, 8 or 10 = 4 - Internal error, array not returned = 5 - Volume wasn't received = 6 - Volume couldn't read Author.: Peter Verbeek Modified.: = Func _SoundGetWaveVolume ( $iValueOnError = - 1 ) Local $LPDWORD, $aMMRESULT, $iVolume $LPDWORD = DllStructCreate ( "dword" ) If 0 Then SetError ( 1 ) 1 = unable to create Struct Return $iValueOnError EndIf get app volume of this script $aMMRESULT = DllCall ( "winmm.dll", "uint", "waveOutGetVolume", "ptr", 0, "long_ptr", DllStructGetPtr ( $LPDWORD ) ) Switch Case 1 SetError ( 2 ) 2 = dll file not found Return $iValueOnError Case 2, 3, 4, 5 SetError ( 3 ) 3 = wrong call so not on Windows Vista, 7, 8 or 10 Return $iValueOnError EndSwitch If not IsArray ( $aMMRESULT ) Then SetError ( 4 ) 4 = internal error, array not returned Return $iValueOnError EndIf If $aMMRESULT 0 Then SetError ( 5 ) 5 = volume wasn't received Return $iValueOnError EndIf $iVolume = DllStructGetData ( $LPDWORD, 1 ) If 0 Then SetError ( 6 ) 6 = volume couldn't read Return $iValueOnError EndIf Return Round ( 100 * $iVolume / 4294967295 ) return in range 0 to 100 as SoundSetWaveVolume() EndFuncĪm trying to make the list of features in list view and control itĪm using the dism command line to read output
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |