Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/20/2018 in all areas

  1. @IAMK Because you could spend a year trying to decipher what faustf says and make any sense of it, in plain English - you need to post the code you're working with, with a detailed description of what you are trying to accomplish, what problem you are experiencing, and what you have tried on your own to resolve it. You have been around long enough this should be second nature to you by now, but see the link in my signature for all of the information we need from you in order to properly assist.
    2 points
  2. CoePSX

    Drawing script

    Hi I've been working on this script in the last few days, and although it's not so small, I believe it can serve a few coding examples and provide some fun. It's idea is simple: It reads an image, makes it b/w, and using the mouse it draws this image. I made this to draw images on handwrite messages in MSN, but it can be tested in Paint or any other image editor. The image processing is done by capturing the image, and using the GetBitmapBits API to get the pixels' colors. Based on the pixels color and the set sensitivity, it will be either black or white (the black part is the one that is going to be drawn). The drawing was a little bit harder to get working on big images. To make it look more like drawing than like printing, the script draws black areas using recursion. In big areas this would overflow the call stack, so I use an array as a custom stack. The random drawing pattern is my favorite. This is practically useless, but I have a lot of fun using this in MSN. But people don't believe I draw that good... drawingscript.au3 mae.bmp
    1 point
  3. As the WebDriver UDF - Help & Support thread has grown too big, I started a new one. The prior thread can be found here.
    1 point
  4. Typo, unnecessary m at the end.
    1 point
  5. Not using 'send' (more reliable): $h = WinGetHandle("Save As") WinActivate($h) $c = ControlGetHandle($h,"",1001) ControlSetText($h,"",$c,"c:\dev\test.txt") $c = ControlGetHandle($h,"",1) ControlFocus($h,"",$c) ControlClick($h,"",$c) I hate enabling the use of not using filecopy()...but the functions I'm using are good practice for automating applications more reliably. this is still very minimalistic. if I wanted my script to be successful 99.99999 percent of the time I would verify all window and control states. I'd also use winmenuselectitem instead
    1 point
  6. According to the help file (which is your friend btw.) parameter 2 of RunWait is used to specify the working directory, not parameters for the program to execute. I would try: $iReturn = RunWait("c:\myfolder\Tools\AutomaticRun\myexe.EXE /filename=c:\myfolder\Tools\AutomaticRun\myTemplate.xml")
    1 point
  7. So much work to replicate filecopy ().
    1 point
  8. 1 point
  9. @Slipk One of many ways #include <ButtonConstants.au3> #include <ColorConstants.au3> ; Added #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> Global $value = 3, _ $arrItemIDs[$value], _ ; Added $intItemColor ; Added $Form1 = GUICreate("Form1", 605, 331, -1, -1) $ListView1 = GUICtrlCreateListView("#|Example", 0, 0, 602, 262) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150) $Button1 = GUICtrlCreateButton("create", 16, 280, 75, 25) $Button2 = GUICtrlCreateButton("go", 116, 280, 75, 25) GUISetState(@SW_SHOW, $Form1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $i = 0 To $value - 1 ; Changed $i from 1 to 0 $arrItemIDs[$i] = GUICtrlCreateListViewItem("item" & $i & "|" & "example", $ListView1) ; Added Next Case $Button2 ; Added For $i = 0 To UBound($arrItemIDs) - 1 Step 1 ; Sleep(1000) ;change for every item background color If Mod($i, 2) = 0 Then $intItemColor = $COLOR_YELLOW Else $intItemColor = $COLOR_SILVER EndIf GUICtrlSetBkColor($arrItemIDs[$i], $intItemColor) Next EndSwitch WEnd
    1 point
  10. I changed my codes so that local chromedriver.exe is used when the notebook creates a webdriver session and the problem was solved. Still unresolved is why the notebook can run a program in the desktop when connected by cable and cannot run the same program when connected by wifi in the same local network. Thank you for your hint.
    1 point
  11. So the problem with the hash is that the software we use that outputs pdfs doesn't create them binarily (is that a word?) identical using the same variables so each time a pdf is created it gets a new hash. I was able to get around this by using the pdf2json module and grabbing the rasterization of each page, then comparing each array from both pdfs.
    1 point
  12. #include <WindowsConstants.au3> #include <WinAPISysWin.au3> Local $hWnd = WinGetHandle("your window") $WS_EX_STYLE = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE) If BitAND($WS_EX_STYLE, $WS_EX_TOPMOST) Then     ConsoleWrite(" Window is on top ") Else     ConsoleWrite(" Window is not on top ") EndIf
    1 point
  13. Like I said, I suspect a rights issue. Perhaps the log file can't be opened for updating. IDK. You could try adjusting your code to eliminate the logging as a test. But you are in the best position to figure it out. It just takes effort to eliminate the possibilities one by one.
    1 point
  14. Today I'm tired. I just make a quick look ... your case is in progress.
    1 point
×
×
  • Create New...