Jump to content

AlessandroAvolio

Active Members
  • Posts

    79
  • Joined

Community Answers

  1. AlessandroAvolio's post in Check if the data is numeric or not: IsNumber() IsInt() not work ? was marked as the answer   
    IsNumber asks whether the content of the variable is meant to represent a numeric quantity. A string is not meant to represent a number but a series of characters.
    IsNumber(variable) ... -> "variable" can be a number, array, string, pointer, boolean.
  2. AlessandroAvolio's post in Creating simple script with hotkey was marked as the answer   
    https://www.autoitscript.com/autoit3/docs/intro/lang_datatypes.htm
     
  3. AlessandroAvolio's post in Detect screen change (NOT FOR A GAME!) was marked as the answer   
    Open Scite, type the function name, set the cursor on the word, press F1, you get definition and examples. 
    An example of a program that might work  
    #include <AutoItConstants.au3> Main() Func Main() Local Const $aScreenArea[4] = [39, 355, 123, 429] ; Get coords with AutoIt v3 Window Info tool, Mouse tab Local $iCheckSumZero Local $iCheckSumNotZero Local $iCheckSum MsgBox(64, "Collecting graphic info", "Ensure number zero is on screen, inside $aScreenArea portion before continue") $iCheckSumZero = PixelChecksum($aScreenArea[0], $aScreenArea[1], $aScreenArea[2], $aScreenArea[3]) While 1 $iCheckSum = PixelChecksum($aScreenArea[0], $aScreenArea[1], $aScreenArea[2], $aScreenArea[3]) While $iCheckSum == $iCheckSumZero Sleep(400) $iCheckSum = PixelChecksum($aScreenArea[0], $aScreenArea[1], $aScreenArea[2], $aScreenArea[3]) WEnd $iCheckSumNotZero = $iCheckSum SoundPlay(@WindowsDir & "\media\tada.wav", $SOUND_NOWAIT) $iCheckSum = PixelChecksum($aScreenArea[0], $aScreenArea[1], $aScreenArea[2], $aScreenArea[3]) While $iCheckSum == $iCheckSumNotZero Sleep(400) $iCheckSum = PixelChecksum($aScreenArea[0], $aScreenArea[1], $aScreenArea[2], $aScreenArea[3]) WEnd WEnd EndFunc  
  4. AlessandroAvolio's post in How to get table cell one by one? was marked as the answer   
    You need basic concept of "accessing data in array": https://www.autoitscript.com/wiki/Arrays#Accessing_Data_in_Arrays
    Local $aArray[3] = [1, 2, 3] For $i = 0 to Ubound($aArray) -1 msgbox(0, "", $aArray[$i]) Next  
  5. AlessandroAvolio's post in How to get text from IE Table and Use it for future ? was marked as the answer   
    You have received replies on the topic specified in the title of the discussion. For new questions please mark the solution in this thread and open a new thread.  
  6. AlessandroAvolio's post in Middle mouse rolling/scrolling was marked as the answer   
    https://www.autoitscript.com/autoit3/docs/functions/MouseWheel.htm
    MouseWheel
  7. AlessandroAvolio's post in its possible to select dropdown item with StringInStr ? was marked as the answer   
    #include <IE.au3> Main() Func Main() Local Const $sSELECT_NAME = "choice" Local Const $sPARTIAL_STRING = "third" Local $oIE, $oSelect $oIE = _IECreate("https://yari-demos.prod.mdn.mozit.cloud/en-US/docs/Web/HTML/Element/select/_sample_.Basic_select.html") $oSelect = _IEGetObjByName($oIE, $sSELECT_NAME) For $oOption In $oSelect.options If StringInStr($oOption.text, $sPARTIAL_STRING) > 0 Then Return _IEFormElementOptionSelect($oSelect, $oOption.text, 1, "byText") EndIf Next Return 0 EndFunc You need to get a list of all options of select and use Stringinstr with each of them. Use $oSelect.Option and then $oSelectOption.text like in the example upside. You also need to use a For...in..next loop in order to enumerate elements in an object collection.
    https://www.autoitscript.com/autoit3/docs/keywords/ForInNext.htm
  8. AlessandroAvolio's post in Hide titlebar and menubar of an application window (like Notepad) was marked as the answer   
    Hello, this could help you.
    #include <GuiConstants.au3> #include <WinAPISysWin.au3> #include <GuiMenu.au3> Main() Func Main() Local $hWnd, $iStyle, $hMenu, $aWinPos Run("notepad") $hWnd = WinWait("[Class:Notepad]", "") Sleep(50) ;~ Retrieves the handle of the menu assigned to the given window $hMenu = _GUICtrlMenu_GetMenu($hWnd) ;~ Deletes menu items from the specified menu For $i = _GUICtrlMenu_GetItemCount ($hMenu) - 1 To 0 Step -1 _GUICtrlMenu_RemoveMenu($hMenu, $i) Next ;~ Retrieves style about the specified window $iStyle = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE) ;~ Remove title bar $iStyle = BitXOR($iStyle, $WS_POPUPWINDOW) _WinAPI_SetWindowLong($hWnd, $GWL_STYLE, $iStyle) ;~ Refresh window style $aWinPos = WinGetPos($hWnd) WinMove($hWnd, "", $aWinPos[0], $aWinPos[1], $aWinPos[2] + 1) Return 0 EndFunc  
  9. AlessandroAvolio's post in send enter to process finish . was marked as the answer   
    I am happy. Unfortunately I don't know the application, can't you try the same way? And if you copy and paste the text, does it work? You could try with Clipput and then with Send ("^ v"). I can't tell you anything else
×
×
  • Create New...