Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Thank you so much for your reply. I am travelling. Will check the link and will post the solution by Tuesday.
  3. #include <GUIConstantsEx.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example") Local $idOK = GUICtrlCreateButton("OK", 310, 370, 85, 25) ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idOK Call("secondGui") ExitLoop EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example Func secondGui() ; Create a GUI with various controls. Local $sGUI = GUICreate("SECONDGUI") Local $exit = GUICtrlCreateButton("EXIT", 310, 370, 85, 25) ; Display the GUI. GUISetState(@SW_SHOW, $sGUI) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $exit ExitLoop EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($sGUI) EndFunc
  4. i tried your code. and the first gui does not delete until the second gui is closed
  5. Can you query sysdriver without tripping UAC? wmic sysdriver get /format:list | find "mic"
  6. @PramodR Depending on how much administrative control you have over your users' environment, you can suppress the UAC prompt for users that are local admins of their workstation by either using group policy or by modifying the registry. The following link should give you all of the information that you need to make the modifications. In your case, if the users are truly local admins, you want to direct your attention to the "ConsentPromptBehaviorAdmin" registry key or "User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode" group policy. If this is configured correctly, then local admins will not be prompted when you add the #RequireAdmin directive to your scripts. User Account Control Group Policy and registry key settings A very helpful UDF lib for getting and setting UAC-related registry settings is UAC.au3 submitted by @AdamUL
  7. copy the following script (3 functions) and paste it to the bottom of your already working script (ensure that #include <ScreenCapture.au3> is present at the top of your script) to capture the screenshot of the FireFox window replace the line in your script where you call _ScreenCapture_Capture ( $networkSharePath & "\peo_craq_rpbc_top10_alarmop.png", 282, 175, 1062, 640) with the following line instead: _CaptureFireFox_Screen($sFilename) wher $sFilename contains the path and filename of the picture you wish to save. This should save a picture of the FireFox window on the path and with the name specified in the $sFilename parameter even if the screen is locked (it works on my system). ; #include <ScreenCapture.au3> Func _CaptureFireFox_Screen($sFilename) $hFFox = HWnd(_Firefox_Get_Handle()) If @error Then Return SetError(1, 0, False) ; save the screenshot of the FireFox window to $sFilename ; even while the screen is locked _ScreenCapture_CaptureWnd_mod($sFilename, $hFFox) EndFunc ;==>_CaptureFireFox_Screen ; retrieve the handle of FireFox (and maximize it) Func _Firefox_Get_Handle() ; MozillaWindowClass Local $aList = WinList("[CLASS:MozillaWindowClass]"), $hHandle ; get FirFox handle For $i = 1 To $aList[0][0] If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then $hHandle = $aList[$i][1] ExitLoop EndIf Next If Not $hHandle Then ; MsgBox(0, "Debug", "Problem on getting FireFox handle") Return SetError(1, 0, False) EndIf ; Activate the firefox window and maximize it WinActivate($hHandle) WinSetState($hHandle, '', @SW_MAXIMIZE) Return $hHandle EndFunc ;==>_Firefox_Get_Handle ; #FUNCTION# ==================================================================================================================== ; Author ........: Paul Campbell (PaulIA) ; Modified.......: chimp ; ; modified version of the _ScreenCapture_CaptureWnd() function ; It uses the _WinAPI_PrintWindow() to capture the window ; it should work also with screen locked ; ------------- ; =============================================================================================================================== Func _ScreenCapture_CaptureWnd_mod($sFilename, $hWin, $bCursor = True) Local $bRet = False Local $iSize = WinGetPos($hWin) Local $iW = $iSize[2] Local $iH = $iSize[3] Local $hWnd = _WinAPI_GetDesktopWindow() Local $hDDC = _WinAPI_GetDC($hWnd) Local $hCDC = _WinAPI_CreateCompatibleDC($hDDC) Local $hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iW, $iH) ; $hCDC Identifies the device context ; $hBMP Identifies the object to be selected _WinAPI_SelectObject($hCDC, $hBMP) _WinAPI_PrintWindow($hWin, $hCDC) If $bCursor Then Local $aCursor = _WinAPI_GetCursorInfo() If Not @error And $aCursor[1] Then $bCursor = True ; Cursor info was found. Local $hIcon = _WinAPI_CopyIcon($aCursor[2]) Local $aIcon = _WinAPI_GetIconInfo($hIcon) If Not @error Then _WinAPI_DeleteObject($aIcon[4]) ; delete bitmap mask return by _WinAPI_GetIconInfo() If $aIcon[5] <> 0 Then _WinAPI_DeleteObject($aIcon[5]) ; delete bitmap hbmColor return by _WinAPI_GetIconInfo() _WinAPI_DrawIcon($hCDC, $aCursor[3] - $aIcon[2] - $iSize[0], $aCursor[4] - $aIcon[3] - $iSize[1], $hIcon) EndIf _WinAPI_DestroyIcon($hIcon) EndIf EndIf _WinAPI_ReleaseDC($hWnd, $hDDC) _WinAPI_DeleteDC($hCDC) If $sFilename = "" Then Return $hBMP $bRet = _ScreenCapture_SaveImage($sFilename, $hBMP, True) Return SetError(@error, @extended, $bRet) EndFunc ;==>_ScreenCapture_CaptureWnd_mod
  8. i want to rename a folder present in the folder path c:/temp with a random name this folder inside c:/temp is called update2016 how i can ranzomize this folder ? example one update2016_809394816 example two update2016_271394881 example three update2016_529396814
  9. Today
  10. The AI.au3 you see is (in this case) checks "handwritten digits" and calculates the best possible digit it think it is The file's beneath the ai.au3 are the mnist database (handwritten digits and it's "target") The targets are there for the "backwards propagation". The handwritten digits are in a grid of 28 by 28 whit a black/white of 0 to 255. In the beggining you have 1 "array" (or vector) of 784 (28*28) whit value's of 0-255 and propagrate forward (whit matrix math E4A) to a array[10] (1 for each digit). you see what i mean iff you klik the label "normelized input" pseudo code: (input[0]*wheigt[0])+(input[1]*wheight[1])+(...))+bias = output hiddenlayer1-node1 Where you are talking about doesn't sounds like a proper AI (code who thinks for it self instead of working out a code) or am i wrong? If not could I see your feed function?
  11. are you sure the dell omci class is the only place you can get this information from?
  12. Sorry just reread your post and see you had already tried #RequireAdmin, if you are going to launch Cmd as elevated you will always see the UAC prompt, for example, I'm an administrator on my machine, however if I run cmd.exe it will always start in user mode, I still require Run As Administrator which then show UAC. The only way around this would be switch UAC off.
  13. That, and you don't need to use Call(), just invoke your function.
  14. The most likely issue is that the web site now requires secure connections to use newer TLS protocols. Windows 7, if not specifically updated, did not contain the definitions and services to use TLS 1.1 or 1.2. Windows 10 did come with these definitions and services. You can use this link to give you a starting point to understanding the possible issue and how to resolve it. Update to enable TLS 1.1 and TLS 1.2 as a default secure protocols in WinHTTP in Windows
  15. It should be: Case $iStart + 1 To $iEnd - 1 You are only interested in treeview item controls. $iStart and $iEnd are dummy controls, so let's exclude both. The level is the number of vertical lines in front of a treeview item. Here all parent items are level 1 and all child items are level 2.
  16. How to delete a gui and run another gui

    @Collins why do you need an example, the explanation was very clear: #include <GUIConstantsEx.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example") Local $idOK = GUICtrlCreateButton("OK", 310, 370, 85, 25) ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idOK Call("secondGui") ExitLoop <=====You exit your Loop HERE, BEFORE calling GUIDelete| | EndSwitch | WEnd | | ; Delete the previous GUI and all controls. | GUIDelete($hGUI)<===========================================================| Here EndFunc ;==>Example So if you want to close the first gui, where do you suppose you need to move the GuiDelete call?
  17. can you give me sample please
  18. Custom Image Button in AutoIt.

    @seedhusk dog ate your help file? Look at the section on GuiCtrlCreateButton, it specifically says:
  19. @Gaffgarion what i your ultimate end goal with the script; what are you trying to automate? There is doubtless a better way to do it.
  20. @iamtech stick to one thread per topic.
  21. @iamtech You have been referred to _IETagNameGetCollection multiple times, yet you haven't shown any effort on your part to solve the problem. You can't expect us to write your code for you. Please make an effort to solve this on your own. There are plenty of examples of using _IETagNameGetCollection (both in the help file and on this forum).
  22. Yo, that was what I was thinking when I posted here: a more general approach! Thank you all for your help!
  23. @seandisanti i want to click on third row of my table
  24. Hi! Started with AutoIt just day ago also pardon my english Let's say my hotkey is R key and every time I hit R key I want a different key to be the output until it reaches the end, after that, the next time I hit R key again it would go back to the first output and so on and so forth. 1st time hitting R key = "Q" key pressed 2nd time hitting R key = "W" key pressed 3rd time hitting R key = "E" key pressed 4th time hitting R key = "R" key pressed 5th time hitting R key = "Q" key pressed < back to the first key and so on... You get the idea. i've made it my own, but i dont think i can do more, im at my wits end this is my code HotKeySet("{R}", "keyset") $Var = 0 Func keyset() If $Var = 0 Then Send("{Q}") $Var += 1 EndIf If $Var = 1 Then Send("{W}") $Var += 1 EndIf If $Var = 2 Then Send("{E}") $Var += 1 EndIf If $Var = 3 Then Send("{R}") $Var = 0 EndIf EndFunc thank you!
  25. TreeVIew Check only Child Selected

    Thanks LarsJ Now work very well. but i need know two thing in your way: 1- why used -1 for this part? Case $iStart - 1 To $iEnd - 1 2- what is your mean about level? Can you explain more?
  26. I'm quite new to AutoIT and I have a very big batch file that I'm trying to completely re-write in Autoit, so far it's been going well but I got stuck with a certain part, hope someone can help. Here's the part of the batch script I'm currently stuck re-creating in AutoIT:     :BeginLangMenu     if "%OptNum%" gtr "0" goto ShowLangMenu          ::Next Section code based on code supplied by Aacini from stackoverflow.com     :DefineLangMenu     for /L %%D in (1,1,99) do (        if exist Common\Settings\Data%%D.ini for /F "eol=# tokens=1,2 delims==" %%a in (Common\Settings\Data%%D.ini) do (                set line=%%a           if "!line:~2,5!" neq "clude" (              REM Define "normal" variables, i.e. Compressor, Method, etc.              set %%a=           ) else if "!line:~7!" neq "" (                   REM Define the base array elements, i.e. D1IncludeAR=%%b, D1ExcludeAR=%%b, ...              set D%%D%%a=%%b                   REM Set Show?? array elements with value equal 1, i.e. ShowAR=1, ...              REM when anyone of DiInclude?? or DiExclude?? corresponding elements was given              if defined D%%D%%a set Show!line:~7!=1                )        )     )          REM Define a list of language abbreviations, i.e. "langs=AR CZ DE ..."     REM and the corresponding language names array, i.e. lang[AR]=Arabic, ...     REM At same time, calculate original OptNum          for %%a in ("AR=Arabic" "CZ=Czech" "DE=German" "EN=English" "ES=Spanish" "ESMX=Spanish(Mexico)"                 "FR=French" "HU=Hungarian" "IT=Italian" "JP=Japanese" "KR=Korean" "PL=Polish"                 "PR=Portuguese" "PRBR=Portuguese(Brazil)" "RU=Russian" "ZH=Chinese") do (        for /F "tokens=1,2 delims==" %%b in (%%a) do (           set "langs=!langs! %%b"           set "lang[%%b]=%%c"           set /A "OptNum+=Show%%b"             )     )          ::NEXT 2 SECTIONS DISPLAYS THE LANGUAGE SELECTION MENU IF APPLICABLE     :ShowLangMenu     set /a step=%step%+1     :LangMenu     if "%OptNum%"=="0" Goto checksplit     echo %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% - Showing Language Selection Menu >> "%workdir%Conversion.log"     REM Show the language menu     set #=0     for %%a in (%langs%) do (        if defined Show%%a (           set /A #+=1     rem       echo [!#!] !lang[%%a]!           echo !lang[%%a]! >> %b2eincfilepath%\Lang.txt           set "option[!#!]=%%a"         )     )               %MYFILES1%\DROPDOWNBOX.exe /F:"%b2eincfilepath%\Lang.txt" "Choose Which Language to Compress" "STEP %step%: Language Selection"  /W:280 /RI /C:13 >nul > %b2eincfilepath%\LangAnswer.txt     if %ERRORLEVEL% EQU 0 del %b2eincfilepath%\LangAnswer.txt     if exist %b2eincfilepath%\LangAnswer.txt set /p "SelectLang="<%b2eincfilepath%\LangAnswer.txt     if not defined SelectLang goto LangError     if %SelectLang%==Arabic Set LangOpt=AR     if %SelectLang%==Czech set LangOpt=CZ     if %SelectLang%==German set LangOpt=DE     if %SelectLang%==English set LangOpt=EN     if %SelectLang%==Spanish set LangOpt=ES     if %SelectLang%==Spanish(Mexico) set LangOpt=ESMX     if %SelectLang%==French set LangOpt=FR     if %SelectLang%==Hungarian set LangOpt=HU     if %SelectLang%==Italian set LangOpt=IT     if %SelectLang%==Japanese set LangOpt=JP     if %SelectLang%==Korean set LangOpt=KR     if %SelectLang%==Polish set LangOpt=PL     if %SelectLang%==Portuguese set LangOpt=PR     if %SelectLang%==Portuguese(Brazil) set LangOpt=PRBR     if %SelectLang%==Russian set LangOpt=RU     if %SelectLang%==Chinese set LangOpt=ZH     if defined SelectLang Goto LangSet          ::SETS THE LANGUAGE SELECTION ACCORDING TO USER INPUT IN LANGUAGE MENU     :LangSet     set "LangIs=%LangOpt%" Basically, here's what I need to do: Read from specific section of INI file but ONLY the Keys that have a Value. OR: A way to remove the keys without the values from the Array created by IniReadSection. A way to then take these stored values, and create a list of Languages based last 2-4 characters of the Key names. At this point, that said list is shown to user in DropDown box, after user make selection I need a way to move the Value of the Key related to the selected Language to a Variable, and ONLY the value for that specific Language. That's it basically, the rest is more or less Variable manipulation which isn't a problem. A little Example: My INI file have a Section like this: [LangInclude] IncludeAR=a IncludeCZ= IncludeDE=b IncludeEN= IncludeES=c IncludeESMX= IncludeFR= IncludeHU=d IncludeIT= IncludeJP= IncludeKR=e IncludePL= IncludePR= IncludePRBR= IncludeRU= IncludeZH= I need to get Only the keys that are set, in this case: IncludeAR, IncludeDE, IncludeES, IncludeHU & IncludeKR. I then need to convert these to a list of languages, in this example it will be (Arabic, German, Spanish, Hungarian, Korean). That list will be turned to DropDown selection, that I can do easily once I get the list correctly. After the user Selected, let us say for the example purpose Spanish, I need the Value of IncludeES to be moved into a Variable, like this: $Var=c I hope somebody can help me because I'm stuck after Importing the INI section with IniReadSection, everything I tried so far failed, the best I managed to do is Sort the array to have all the keys with values either at the first rows or last rows. I need some ideas. Help appreciated. Thanks
  1. Load more activity
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.