Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. A Excel workbook can be accessed like a database using ADO (example). This allows to bypass all Excel limitations.
  3. Are there any up to date gui designers / builders for Python preferably built for Tkinter? If not what would you guys recommend as a good gui framework to use today considering Tkinter is quite old and doesn't look very modern.
  4. Thanks for help! This code tip worked for meπŸ˜€β˜ΊοΈπŸ˜œ
  5. Today
  6. I have a positive experience about AutoIt GUI, so you found a great option for yourself:)
  7. I just installed the latest version of SciTE editor and now it won't run or compile scripts and the Save function doesn't work. The output window just shows "Access is denied". I can save using "Save as..." with navigation. I can compile by executing AutoIt3Wrapper.exe directly and navigating to the .au3 file to be compiled. I can run a .au3 file by double clicking it, but I can't run a script in the window. I unsintalled and reinstalled - no change. Eset AV is off, in case that's a problem.ο»Ώ Any ideas what I'm doing wrong here?
  8. It's almost the same; only the way you get the 2-Dimension array changes. You need to read the whole sheet in an array, then make a comparsion of a value to extract the data in separate files. One of the easiest way yo do that is using _Excel_RangeRead() with the parameter $bForceFunc set to true as @water suggested, so you'll have the array with all the values, and then you can do whatever you want. But, you could think to use an SQLite database either, which could save you for sure some time. You can find Excel to SQLite converter(s) online, and manage all the SQLite stuffs using _SQLite_* functions in AutoIt
  9. Can you disable keyb/mouse integration with the host? I do find it interesting that running a script within the guest manipulates the host. Does it do it if the VM is minimized or the console closed?
  10. Sorry,the code is not complete ..i didn't revise it πŸ€’ Also, there is no (Edit) Button πŸ™„ Here it is : #NoTrayIcon #AutoIt3Wrapper_UseX64=NO #include <imageSearchEX.au3> Global $imageSearchEX = imageSearchEX Global $_Check_Image = _Check_Image $Your_Window = "";your window $Your_Control = "";your Control $Your_Image = "";your Image While 1 $Coords = $_Check_Image($Your_Window,$Your_Control,$Your_Image) If $Coords <> 0 Then ;Do Something ExitLoop EndIf Sleep(10000) ;Sleep 10 Seconds WEnd Func _Check_Image($Window, $Control, $Image) $Hwnd = WinGetHandle($Window) $Control_Pos = ControlGetPos($Hwnd,$Control) $Coords = $imageSearchEX($Hwnd,$Image) $Result = $Coords If $Coords <> 0 Then Local $Image_Pos[] = [ $Coords[0] - $Control_Pos[0], $Coords[1] - $Control_Pos[1] ] $Result = $Image_Pos EndIf Return $Result EndFunc
  11. You are lucky that I have seen your topic ! ======= First of all, you shouldn't use the ordinary image search function...as it is not good because it requires that the image appears on the screen, so you can't do any other thing while the script is running ,so you need the ~:{:}{ImageSearchEX}{:}:~ function by it,you can search for the image in a specific window...and the function don't require that the image appears on the screen >> only it should appear on the window ,so this function run in the background ======= Image Search EX Topic : https://www.autoitscript.com/forum/topic/196542-image-search-inactive-window-but-not-minimized/ ======= note that : 1 : This function doesn't run on X64 bit ,so you have to make the script run on 32 bit by using : #AutoIt3Wrapper_UseX64=NO 2 : This function requires the window to be shown ,not minimized or hidden. ,so if you want to hide the window : just move it to (-X , -Y) Position that is out of the screen ====== Eventually : Here is the code you need : #NoTrayIcon #AutoIt3Wrapper_UseX64=NO #include <imageSearchEX.au3> Global $imageSearchEX = imageSearchEX Global $_Check_Image = _Check_Image $Your_Window = "";your window $Your_Control = "";your Control $Your_Image = "";your Image While 1 $Coords = $_Check_Image($Your_Window,$Your_Control,$Your_Image) If $Coords <> 0 Then ;Do Something ExitLoop EndIf Sleep(10000) ;Sleep 10 Seconds WEnd Func _Check_Image($Window, $Control, $Image) $Hwnd = WinGetHandle($Window) $Control_Pos = ControlGetPos($Hwnd,$Control) $Coords = $imageSearchEX($Hwnd,$Image) Return $Coords EndFunc
  12. Thanks Water. in light of the UDFs and excels limitations and intricacies, would you have a suggested a different way to do this? I can convert xlsx to csv, and use the csv phase / split functions.
  13. @PaulP when you say "actual drive mapping" do you mean the Target Folder for each path, or the true path to the folder on the dfs server?
  14. As jdelaney points out, you will not get that kind of machine-agnostic work with Sends and MouseClicks; they are just too volatile for that. If you post your code, or explain in more detail what you are trying to do, we will do our best to assist
  15. Use functions like ControlSetText rather than Send, and ControlClick rather that MouseClick. Another option, run it on session 0 (where services run) so that it won't interact with your current user session. Also, if you are only doing file manipulation, just use FileRead and FileWrite. Using Send and MouseClick will make concurrent running scripts easily conflict with each-other.
  16. This is kind of hard to explain...but let me try! What I want to do is run some tasks on a virtual PC independently of my current machine. Say the task is this, running in a loop, it operates on mouse moves and keystrokes, fetches clipboard text 1. Open notepad, type "hello" world 2. Copy "hello" with mouse, and then paste it manually 4 lines lower. 2. Save the file Now when I run tasks like this simultaneously on Virtual Box, my guest OS, mouse, keyboard and clipboard affects the guest host. Same thing with team viewer. Short of running the task on a separate PC, is there a way to have tasks running on virtual machine that is independent of guest OS controls?
  17. $a = DriveGetDrive ("NETWORK") For $i = 0 To UBound($a)-1 ConsoleWrite(DriveMapGet($a[$i]) & @CRLF) Next or is it not a mapped drive? If it's not mapped, you can run a command prompt with 'net use'...not sure if there is an autoit equivalent...parse the output.
  18. Yesterday
  19. @SW_RESTORE = Undoes a window minimization or maximization Restore from the minimized or maximized state, and then set your new state. You also missed a variable in your winmove: $citrix_handle = GUICreate("my test app") GUISetState(@SW_SHOW, $citrix_handle) $hide = WinSetState($citrix_handle,"",@SW_HIDE) MsgBox(1,1,"hide") $show = WinSetState($citrix_handle,"",@SW_SHOW) MsgBox(1,1,"show") $min = WinSetState($citrix_handle,"",@SW_MINIMIZE) MsgBox(1,1,"minimized") WinSetState($citrix_handle,"",@SW_RESTORE) $max = WinSetState($citrix_handle,"",@SW_MAXIMIZE) MsgBox(1,1,"maximized") WinSetState($citrix_handle,"",@SW_RESTORE) $win1 = WinMove($citrix_handle,"",0,0,@DesktopWidth,@DesktopHeight) MsgBox(1,1,"winmove") MsgBox(262144,"Results","Hide=" & $hide & @crlf & "Show=" & $show & @crlf & "Min =" & $hide & @crlf & "Max =" & $max & @crlf & "Win1=" & $win1 & @crlf & @crlf) Just saw your question with WinGetState as well...that returns the sum of ALL states on the window. So if a window exists, is visible and is enabled and that is all, the win state is: 7 Use BitAnd to determine if a particular state is present...such as this checking to see if the window is enabled: If BitAND(WinGetState($win), 4) Then ; Is Enabled EndIf If Not BitAND(WinGetState($win), 4) Then ; Is Disabled EndIf Everything is working as expected, you just have those first few hurdles of determining what is what.
  20. Just my own preference...rather than worrying about double negatives and such, you can do this instead If BitAND(WinGetState($win), 4) Then ; Is Enabled EndIf If Not BitAND(WinGetState($win), 4) Then ; Is Disabled EndIf Sorry to not answer your question though. Do you have a snippet that can reproduce without me having to trust a download? Made a quick snippet: $win = GUICreate("my test app") GUISetState(@SW_SHOW, $win) WinSetState($win,"",@SW_DISABLE) MsgBox(1,1,"I should be 0: [" & BitAND(WinGetState($win), 4) & "]") WinSetState($win,"",@SW_ENABLE) MsgBox(1,1,"I should be greater than 0: [" & BitAND(WinGetState($win), 4) & "]") GUICtrlDelete($win) @autoItVersion = First return is 0 Second return is 4 Both are expected results.
  21. @roeselpi if you find a few dozens lines of AutoIt code something overhelming (according to your standard) I urge you to download a basic C compiler suite and code the thing you're after in pure C. Remember that C is still today the most prevalent language ever (in running lines of code). Once you pass the 3500 lines of C you'll find forking AutoIt _ArrayDisplay() to clone and tune it to your needs is a piece of cake. Hence when I used the word lazy I was right on track.
  22. Sorry accidentally submited with CTRL+Enter... Anyone has any idea? I'm back to using the old version for now.
  23. Hello, I've recently changed PCs and while doing so I've updated the AutoIt to the latest version. Old version was v3.3.12.0 New version is v3.3.14.5 I'm using AutoIt to control SAP GUI. While compiling a new script using the newest version I immediately noticed that the .exe is over 1MB while the old ones were 900KB+-50. This script uses the SAP GUI's createSession() function which creates a new window, then I check whether that window is enabled with WinGetState() and stop if it's not enabled. Running the script compiled with the newest version creates a new window but according to WinGetState() it is not enabled, this is true: BitAND(WinGetState($win), 4) = 0 Running the script compiled with the old version creates a new window and WinGetState() correctly reports that it is enabled (the above check is false). Full script can be found here: https://gist.github.com/morkai/1ff910502e36ecf60da2bbdff803d144 T_MD04.au3 includes _Logon.au3 then _Logon.au3 calls $sessioon.createSession() @ line 232 then _Logon.au3 calls FindFreeSession() @ line 253 then FindFreeSession() calls IsWinLocked() @ line 60 IsWinLocked() (defined in _Common.au3 @ line 23) returns true in v3.3.14.5 and false in v3.3.12.0
  24. Throw in a com error handler. When the IE browser in not in a ready state, you cannot access the DOM, so then when you attempt to access child objects, and their properties, things blow up. It's a limitation of some of the _IE functions which always assume the browser is in a ready state. For example, when the browser window is hung: _WinAPI_IsHungAppWindow http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(IsHungAppWindow);k(DevLang-C);k(TargetOS-WINDOWS)&rd=true My workaround was to create wrapping functions around the IE ones which would re-try a few times (variably set), and check window states on failures/wait (and DOM states).
  25. I breathe a lot, probably more than you do. So you are the boss, do what you have to do...
  26. Perhaps take your own advice and breathe a bit. New members cannot edit their posts, so after-thoughts are generally another post. The OP is simply trying to explain in detail what he is trying to do.
  27. I couldn't help trying it. StdoutRead works very well. It takes about half a sec to get the info. After that you only need to translate it into an 2D array and you are gone ! Also look at win32_process. There is a lot of very interesting data coming from this class.
  28. I made a photo, I just want the script click on this photo when its found, that's all. I just want to learn Autoit, I'm liking it a lot!
  1. Load more activity
  • Create New...