Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/27/2020 in all areas

  1. huh... I get answer from ByteScout TechSupport: and all is clear.
    1 point
  2. jchd

    Function Variables

    It promotes functions to first-class citizenship. Pretty handy in my view: Global $AD = (@AutoItVersion = "3.3.14.5" ? _DebugArrayDisplay : _ArrayDisplay) Global $CW = @Compiled ? __ConsoleWrite : _ConsoleWrite ; if compiled, create a console Func __ConsoleWrite(ByRef $s) Local Static $hCon = __ConsoleInit() DllCall("kernel32.dll", "bool", "WriteConsoleW", "handle", $hCon, "wstr", $s & @LF, "dword", StringLen($s) + 1, "dword*", 0, "ptr", 0) Return EndFunc ;==>__ConsoleWrite Func __ConsoleInit() DllCall("kernel32.dll", "bool", "AllocConsole") Return DllCall("kernel32.dll", "handle", "GetStdHandle", "int", -11)[0] EndFunc ;==>__ConsoleInit ; if simply run, use Scite's Unicode-aware ConsoleWrite Func _ConsoleWrite($s) ConsoleWrite(BinaryToString(StringToBinary($s & @LF, 4), 1)) EndFunc ;==>_ConsoleWrite
    1 point
  3. Yes... try something like this -- $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//tr[@id='ZoomDisplay0_0']/td[@class='cssTxtMed']")
    1 point
  4. @careca There's a space in the code, Alt + Space brings up a hidden menu You can see it by right clicking on the title bar as well.
    1 point
  5. Something like -- $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//a[contains(@href, 'DashBoard.aspx?Menu=1200000&unique=']")
    1 point
  6. Danp2

    [SOLVED] randomized xpath

    Try this -- $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXpath, "//input[@name='Логин steam']")
    1 point
  7. Danp2

    [SOLVED] randomized xpath

    Have you tried using the element's name instead?
    1 point
  8. Isn't it possible that the message box is coming from Excel since he's opening a macro enabled spreadsheet?
    1 point
  9. Tuesday 26th May I started work on a new companion program for this Suite - Get Blurb For Calibre I've had something like it in mind for a while, but finally started to think more seriously about it a few days ago, and as always, it is a program to fulfill a need. It is currently still a work in progress. NOW FINISHED, but I still need to make a small supporting adaption to my UpdateFromOPF program. UPDATE - It proved to be not quite as small as anticipated (often the way), to adapt my UpdateFromOPF program, but it is all done now, bar the testing. I also added some more code/features to Get Blurb For Calibre, to better support my circumstance and support for UpdateFromOPF ... essentially, I am working across two PCs, whereas most users probably won't be - one has my full Calibre library (offline), the other does the online queries. So the VIEW RESULT button has a CTRL key alternative, which is to copy everything from the program folder to another location (i.e. portable drive), for transfer to my online PC and vice-a-versa. I'd also overlooked the need to extract the updated blurb after UpdateFromOPF use, to show in the Blurb field of Get Blurb For Calibre, on its return ... and for later checking. Screenshots as the program Evolved What does it do? What is my need? Basically, it checks my existing calibre libraries, looking for ebooks that are missing their Blurb or optionally don't have much of a one (based on word count). The blurb (or description, summary, synopsis, comments), makes it somewhat easier to decide on what to read next etc, especially when you have such a large library of ebooks as I do have. Unfortunately, when I first started buying ebooks, and eventually started adding them to the cataloging database program calibre, I did not give much consideration to the blurb. To be honest it was all a bit too hard, especially when free ebooks from Amazon etc via BookBub, started coming thick and fast. Later I started to develop my ebook and calibre related programs, and quite some time after developing my UpdateFromOPF program, I discovered how to query online sources for the blurb (calibre command-line tools), and added that feature to that program. I've been using that feature for a good long while now, and any ebooks I have purchased in the last 6 months or more, all have their blurb. Not so my earlier purchases for a few years, where in the majority of cases a blurb is either missing or very incomplete. So because I now have something like 4,000 ebooks, it is an onerous task to wade through them all, to find and deal with the ones that need a blurb. So I need to Automate It as much as I can, and do it in stages, nibbling away at the huge number of them. Further Information
    1 point
  10. Here my script _SQLite_Startup() Local $hDB = _SQLite_Open(@ScriptDir & "\global-messages-db.sqlite") Local $aRows, $iRows, $iCols _SQLite_GetTable2d($hDB, "select c0body,c1subject,c2attachmentNames,c3author,c4recipients from messagesText_content where c1subject = 'Test' AND c3author = 'test@gmail.com';", $aRows, $iRows, $iCols) ;_ArrayDisplay($aRows) For $x = 1 To 1 ;UBound($aRows) - 1 ;ConsoleWrite($aRows[$x][0]&"-"&$aRows[$x][1]&"-"&$aRows[$x][2]&$aRows[$x][3]&"-"&$aRows[$x][4]&"-"&@CRLF) $file = @ScriptDir & "\" & $x & ".txt" FileOpen($file, 2) FileWrite($file, $aRows[$x][0]) FileClose($file) If FileExists($file) Then Run(@ScriptDir & '\SumatraPDF.exe -print-to-default ' & $file) Sleep(4000) WinWaitActive('[CLASS:#32770]') ControlSend('', '', '', $x) ControlSend('', '', '', '{ENTER}') WinClose("[CLASS:32770]") Else ConsoleWrite("error file not created " & $file & @CRLF) EndIf Next _SQLite_Close($hDB) _SQLite_Shutdown() Bye Bye
    1 point
  11. ??? Remove $iRval = and use _SQLite_Display2DResult($aRows) to view output in console. _SQLite_GetTable2d($hDB, "select c0body,c1subject,c2attachmentNames,c3author,c4recipients from messagesText_content where c1subject = 'Test' AND c3author = 'test@gmail.com';", $aRows, $iRows, $iCols) _SQLite_Display2DResult($aRows) Anyway, you can see my solution here PS: verify my query, because it is not complete, you only have to intercept new emails, otherwise you have duplicates. CIAO
    1 point
  12. Hi How can I run 2 or more scripts in win 10 without interference? edit: found the solution-> using controlclick instead of Mouseclick
    1 point
  13. I use registry: [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe] "ScreenColors"=dword:000000f0 "PopupColors"=dword:000000fc "NumberOfHistoryBuffers"=dword:0000000a "ScreenBufferSize"=dword:0066005a "WindowSize"=dword:001e005a "HistoryBufferSize"=dword:00000064 "FontSize"=dword:000c0008 "FontFamily"=dword:00000030 "FontWeight"=dword:00000190
    1 point
  14. Try this: #Include <Timers.au3> #include <WindowsConstants.au3> Global $hGUI = GUICreate("Hello world!",250,175,-1,-1) Opt("GUIOnEventMode", 1) GUISetOnEvent(-3, "exit_") ; Check if closed GUISetState() Global $iMs = 30 GUIRegisterMsg($WM_TIMER, "_Interrupt") DllCall("User32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iMs, "int", 0) While 1 Sleep(50) WEnd Func exit_() GUIRegisterMsg($WM_TIMER, "") GUIDelete() Exit EndFunc Func _Interrupt() ToolTip("This tooltip should move.") EndFunc
    1 point
  15. @Edit Solved... Func _Console_SetSize($iWidth, $iHeight) Local $tConsoleWindow = DllStructCreate($tagSMALL_RECT) DllStructSetData($tConsoleWindow, "Left", 0) DllStructSetData($tConsoleWindow, "Top", 0) DllStructSetData($tConsoleWindow, "Right", $iWidth - 1) DllStructSetData($tConsoleWindow, "Bottom", $iHeight - 1) $aRet = DllCall($vKernel, "bool", "SetConsoleWindowInfo", _ "handle", $CONSOLE_OUTPUT, _ "bool", True, _ "ptr", DllStructGetPtr($tConsoleWindow)) DllCall($vKernel, "bool", "SetConsoleScreenBufferSize", _ "handle", $CONSOLE_OUTPUT, _ "int", BitShift($iHeight, -16) + $iWidth) EndFunc
    1 point
  16. How about using something like this in the loop (not sure in which include the function is in the current au3 release though )? Local $hWinPosInfo For $j = 0 To 100 $nBegin = TimerInit() $hWinPosInfo = _WinAPI_BeginDeferWindowPos(200) For $i = 0 To 199 $iX = $aData[$i][1] + 2 $iY = $aData[$i][2] + 2 _WinAPI_DeferWindowPos($hWinPosInfo, $aData[$i][3], $HWND_TOP, $iX, $iY, 0, 0, BitOR($SWP_NOSIZE, $SWP_NOACTIVATE)) $aData[$i][1] = $iX $aData[$i][2] = $iY Next _WinAPI_EndDeferWindowPos($hWinPosInfo) ConsoleWrite(TimerDiff($nBegin) & @CRLF) Next
    1 point
  17. algiuxas, This simplifies the data storage and runs much faster on my machine - how about yours? HotKeySet("{ESC}", "_Exit") Global $aData[200][3] $hGUI = GUICreate("Test", 500, 500) For $ii = 0 To 19 For $iii = 0 To 9 $iIndex = ($ii * 10) + $iii $iX = 10 + ($ii * 10) $iY = 10 + ($iii * 10) $aData[$iIndex][0] = GUICtrlCreateLabel("", $iX, $iY, 8, 8) GUICtrlSetBkColor($aData[$iIndex][0], 0xFF0000) $aData[$iIndex][1] = $iX $aData[$iIndex][2] = $iY Next Next GUISetState() For $j = 0 To 100 $nBegin = TimerInit() For $i = 0 To 199 $iX = $aData[$i][1] + 2 $iY = $aData[$i][2] + 2 GUICtrlSetPos($aData[$i][0], $iX, $iY) $aData[$i][1] = $iX $aData[$i][2] = $iY Next ConsoleWrite(TimerDiff($nBegin) & @CRLF) Next Func _Exit() Exit EndFuncM23
    1 point
  18. SAPgui, read two files saplogon.ini / SAPUILlandscape.xml...... try to understand first what you need and where to find it, then ask
    0 points
  19. Just something I made to auto-collect Gil from FFCC and to test out a new templating system for AutoIt. The templating system is a work in progress, but it is meant to be a companion to AutoIT, which automates creation of GUI, buttons, scripts, templates, etc. It also has built-in chat and group-collaboration, an asset management system and online library for resources. -snip-
    0 points
×
×
  • Create New...