Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/24/2023 in all areas

  1. Wouldn't curb things as much as you might think. We have tried things like that in the past; there is even an entire thread dedicated to false positives that people see, why the occur, and what to do about them. Yet people continue to post issues they encounter because the don't stop to read.
    1 point
  2. The ConsoleWrite in the function completes before the one in the main script, so the output you saw makes sense to me. You should return the result from the function if you want it to appear inline with the other text -- ConsoleWrite("Hello " & _write15() & " B" & @CRLF) ConsoleWrite("END" & @CRLF) Func _write15() Return 5*3 EndFunc
    1 point
  3. Subz

    I need help

    Look at the followiing functions in help file: ShellExecute - to open .mp3/.mp4 with associated program ControlSend or Send - for Ctrl+a and Ctrl+c FileOpen - Open new text file in write mode using @Year&@Mon&@MDay&@Hour&@Min&@Sec.txt FileWrite - Write to the new text file FileClose - Close the new text file Run - Run the batch script alternatively add the batch script into Autoit script.
    1 point
  4. Just to complete this here, out of the suggestion/answer by @Dan_555, it would look like the following: HotKeySet('{ESC}', '_Exit') HotKeySet('1', '_ToggleLeftShift') HotKeySet('{!}', '_ToggleLeftShift') Global $bIsDown = False Func _Exit() Exit EndFunc Func _ToggleLeftShift() $bIsDown = Not $bIsDown If $bIsDown Then Send('{LSHIFT DOWN}') Return EndIf Send('{LSHIFT UP}') EndFunc While True Sleep(200) WEnd Please notice, that I use this example because @SevenScript also had another question about it here. This is a combination of a toggle function with the SHIFT key problem (which is solved by the statement of @Dan_555 above) 👍 . Best regards Sven
    1 point
  5. Hi totally agree with @JLogan3o13 as I also experienced almost the same during my professional path as a Software Test Engineer (for Test Automation). There is not much to add out of my perspective, but I had good experience with UIPath in the past. @noellarkin It depends 😅 . Do things on your own with pure code instead of RPA solutions seems to be better, you're right. Until the point you want to share and extend your approach with non-technical team members or at least with not well experienced ones. Best regards Sven
    1 point
  6. Something like Global $software = "C:\Program Files (x86)\Stefanini\VW Software Store\VWStoreAPP.exe" Global $Executavelrede = "\\VWBRANDFH1881\fs_rollout\S1003_B-FIO_Meu_Ativo_Loja_Softwares\S2001_Softwares\_Transfer\VW Software Store.exe" If Not FileExists($software) Then Run($Executavelrede) EndIf
    1 point
  7. I'm not a regular contributor here but if the @argumentum digital signing tool works, I think it would be good to add it to the "AutoIt and Malware" page (https://www.autoitscript.com/wiki/AutoIt_and_Malware) as well as the "solution" post on this thread.
    1 point
  8. InunoTaishou, How about this? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <AutoItConstants.au3> #include <WinAPISys.au3> AutoItSetOption("GuiOnEventMode", 1) Global $iBorder = 50, $bOpen = False $hGUI = GUICreate("Test", 500, 500, 200, 200) GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "_MouseMove") GUISetOnEvent($GUI_EVENT_CLOSE, "_Close") $cScrollLabel = GUICtrlCreateLabel("", 500 - $iBorder, 0, $iBorder, 500) GUICtrlSetBkColor($cScrollLabel, 0x000000) GUISetState() $aWinPos = WinGetPos($hGUI) $hChild = GUICreate("Child", 250, $aWinPos[3] - 20, $aWinPos[0] + 506, $aWinPos[1] + 10, $WS_POPUP) GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "_MouseMove") $cButton = GUICtrlCreateButton("Stuff", 20, 10, 220, 20) GUICtrlSetFont($cButton, 10, 300, "", "Segoe UI") GUICtrlSetOnEvent($cButton, "_DoStuff") $cLabel = GUICtrlCreateLabel("Press the button to do stuff", 20, 35, 220, 25) GUICtrlSetFont($cLabel, 10, 300, "", "Segoe UI") GUICtrlCreateGroup("Colors", 20, 65, 220, 100) GUICtrlCreateRadio("Red", 30, 80, 50, 20) GUICtrlSetOnEvent(-1, "_SetColor") GUICtrlCreateRadio("Green", 90, 80, 50, 20) GUICtrlSetOnEvent(-1, "_SetColor") GUICtrlCreateRadio("Blue", 160, 80, 50, 20) GUICtrlSetOnEvent(-1, "_SetColor") GUICtrlCreateRadio("Cyan", 30, 105, 50, 20) GUICtrlSetOnEvent(-1, "_SetColor") GUICtrlCreateRadio("Magenta", 90, 105, 60, 20) GUICtrlSetOnEvent(-1, "_SetColor") GUICtrlCreateRadio("Yellow", 160, 105, 50, 20) GUICtrlSetOnEvent(-1, "_SetColor") GUICtrlCreateRadio("Black", 30, 130, 50, 20) GUICtrlSetOnEvent(-1, "_SetColor") GUICtrlSetState(-1, $GUI_CHECKED) WinSetTrans($hChild, "", 0) GUISetState() _WinAPI_SetWindowPos($hChild, $hGUI, 706, 230, 250, 490, $SWP_HIDEWINDOW) WinSetTrans($hChild, "", 255) GUIRegisterMsg($WM_MOVE, "_WM_MOVE") While 1 Sleep(10) WEnd Func _MouseMove() If Not $bOpen Then $aWinPos = WinGetPos($hGUI) $aCInfo = GUIGetCursorInfo($hGUI) Switch $aCInfo[1] Case 20 To $aWinPos[3] ; Allow space at the top so that moving to the buttons does not opene the child Switch $aCInfo[0] Case $aWinPos[2] - $iBorder To $aWinPos[2] If Not $bOpen Then _WinAPI_AnimateWindow($hChild, BitOR($AW_ACTIVATE, $AW_HOR_POSITIVE)) $bOpen = True WinActivate($hChild) EndIf EndSwitch EndSwitch Else $aWinPos = WinGetPos($hChild) $aCInfo = GUIGetCursorInfo($hChild) Switch $aCInfo[1] Case 0 To $aWinPos[3] If $aCInfo[0] < -$iBorder Then If $bOpen Then _WinAPI_AnimateWindow($hChild, BitOR($AW_HIDE, $AW_HOR_NEGATIVE)) $bOpen = False WinActivate($hGUI) EndIf EndIf EndSwitch EndIf EndFunc ;==>_MouseMove Func _DoStuff() GUICtrlSetData($cLabel, "Stuff happened! :D") Sleep(500) GUICtrlSetData($cLabel, "Press the button to do stuff") EndFunc ;==>_DoStuff Func _SetColor() Switch GUICtrlRead(@GUI_CtrlId, 1) Case "Red" GUICtrlSetBkColor($cScrollLabel, 0xFF0000) Case "Green" GUICtrlSetBkColor($cScrollLabel, 0x00FF00) Case "Blue" GUICtrlSetBkColor($cScrollLabel, 0x0000FF) Case "Cyan" GUICtrlSetBkColor($cScrollLabel, 0x00FFFF) Case "Yellow" GUICtrlSetBkColor($cScrollLabel, 0xFFFF00) Case "Magenta" GUICtrlSetBkColor($cScrollLabel, 0xFF00FF) Case Else GUICtrlSetBkColor($cScrollLabel, 0x000000) EndSwitch EndFunc ;==>_SetColor Func _Close() Exit EndFunc ;==>_Close Func _WM_MOVE($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $lParam If $hWnd = $hGUI Then Local $aWinPos = WinGetPos($hGUI) WinMove($hChild, "", $aWinPos[0] + 506, $aWinPos[1] + 30) EndIf EndFunc ;==>_WM_MOVEPlease ask if you have any questions. M23
    1 point
  9. The child is being moved alright, it's just the repaint that gets messed up for some reason. Here's my lolsome solution: #include <GuiConstants.au3> $Gui = GuiCreate("Test", 300, 200) $ChildGui = GuiCreate("Child test", 300, 200, -1, -1, -1, $WS_EX_MDICHILD, $Gui) $ParentPosArr = WinGetPos($Gui) WinMove($ChildGui, "", $ParentPosArr[0]+$ParentPosArr[2], $ParentPosArr[1]) GUISetState(@SW_SHOW, $Gui) GUISetState(@SW_SHOW, $ChildGui) GUIRegisterMsg(0x231, "On_WM_ENTERSIZEMOVE") GUIRegisterMsg(0x232, "On_WM_EXITSIZEMOVE") While 1 $Msg = GUIGetMsg(1) Select Case $Msg[1] = $Gui And $Msg[0] = -3 Exit EndSelect WEnd Func On_WM_ENTERSIZEMOVE() WinSetTrans($ChildGui, '', 254) EndFunc Func On_WM_EXITSIZEMOVE() WinSetTrans($ChildGui, '', 255) EndFunc There's a better way of doing it than this workaround, but I'm no GUI expert, so go from here on your own if you want. Maybe WM_PAINT or something...
    1 point
  10. you can call in this order ConsoleWrite("Hello ") _write15() ConsoleWrite(" B" & @CRLF & "END" & @CRLF) Func _write15() ;ConsoleWrite("15") ConsoleWrite(5*3) EndFunc or ConsoleWrite("Hello " & _write15() & " B" & @CRLF) ConsoleWrite("END" & @CRLF) Func _write15() ;ConsoleWrite("15") Return 5*3 EndFunc
    0 points
×
×
  • Create New...