UnknownWarrior
Active Members-
Posts
360 -
Joined
-
Last visited
UnknownWarrior's Achievements
Universalist (7/7)
0
Reputation
-
WinActivate is useless
UnknownWarrior replied to UnknownWarrior's topic in AutoIt General Help and Support
Yeah, I understand where you're coming from. I want to thank you for the time you've put into this for me. I understand that your job as a moderator sometimes makes you question the legitimacy of some problems brought up by 'noobs' such as myself, but I'm glad you went ahead and checked out the issue regardless. Keep up the good work here! -
WinActivate is useless
UnknownWarrior replied to UnknownWarrior's topic in AutoIt General Help and Support
Thanks for looking into it. I now recall why I went with MouseClicks -- there was one control that I couldn't get (can't remember which one - had to do with a popup dialog I think), and it was the only one, but beings I had to deal with that regardless, I needed to activate the window anyways. I guess the point here is still the fact that WinActivate (and WinActive for that matter) don't work as intended . Edit: So I went and tested the WinAPI function you pointed me to and here are my findings: _WinAPI_SetWindowPos($handle, $HWND_TOP, 10, 10, 993, 677, $SWP_SHOWWINDOW) -- My flag states it should display the window (it didn't) -- It did work, however I previously just tested with my original method (WinActivate) and that worked as well. Hence my problem again.... it only works 50% of the time with no way to debug it :/ So I don't know what to say... it's working now, but might not tomorrow. Edit2: I just noticed something (it happened again on the same VPS with the Winapi_setwindowpos). On Windows 7 (and Windows Server 2012 - what I use on my VPS's), when you click on a window in your taskbar it lights up the background of that window slightly more than the other non-activated windows. What happened when it failed is that it DID show GSA highlighted (as if it DID activate and it IS currently active), but as I sit staring at my screen GSA was still not active visually. I tried doing WinMinimizeAll before and that didn't help (so it can't be an ALWAYS_ON_TOP flag on the other windows that would be causing this). See the attached image below. The HelpFile window is the active window on my screen, which causes its lighter background in the taskbar. -
WinActivate is useless
UnknownWarrior replied to UnknownWarrior's topic in AutoIt General Help and Support
1. I've had a hard time wrapping my head around post/send message. I'd be more than willing to pay you to write some code to do it for this program with good comments (as if it's a tutorial so I can reproduce it then). The AUInfo doesn't return any control values on this GUI. 2. Yes I tried that, no success. 3. Thanks for a direction to look towards. I'll take a look at that and report my findings. You must have misread my comment to JohnOne. "Do loop to WinActivate("GSA..." Until WinActive("GSA...") and it returns true for WinActive" <-- WinActive checks to see if the given window is active. My apologies for not making it more clear, they're so very similar . -
WinActivate is useless
UnknownWarrior replied to UnknownWarrior's topic in AutoIt General Help and Support
I'll try this, but seems like those would result in the same thing wouldn't they? There's only one window it has displayed, and it's from a SEO program called GSA Search Engine Ranker. Has a trial if you want to test it out. http://search-engine-ranker.gsa-online.de/ Like I said, it works sometimes, and other times it doesn't. What I'm doing is automating this software to set up SEO projects for me (automatically). I run it on 6 VPS's and last night it all went haywire. One VPS has worked for almost 12 hours now, activating back and forth from GSA and another SEO software I automate as well.... but then when I try running it on the other 5 it REFUSES to show itself in the foreground so I can make the mouse clicks on it. What's worse is that I have a Do loop to WinActivate("GSA..." Until WinActive("GSA...") and it returns true for WinActive Check reply above. I do use a Do loop to check if it's active and it's returning true :/. -
Is there some kind of Windows GUI that doesn't allow activation? Here is everything I have tried and have set: - I have WinTitleMatch off (not exact) - I've tried simply WinActivating the GUI -- worked 50% of the time - I've tried WinMizimizeAll, sleep 5 seconds, WinActivate the GUI -- works 50% of the time - I've tried all the above steps by setting all other windows WinSetOnTop to 0 (so no other window is OnTop) -- same results What gives? :/ Is there any work around? Edit: Forgot to add... What's worse is that "If WinActivate($myTitle) Then" always passes true when the window is NOT ACTIVE. I need it visibly active for my MouseClicks to work (and no, ControlClicking will not work in my case).
-
FTP Idle Connections
UnknownWarrior replied to UnknownWarrior's topic in AutoIt General Help and Support
As in my scripts computer runtime (I've never timed how fast the FTP Open/Close take haha). But I made the change and it seems to be working right now. I use HostGator and their timeout must be about 10 minutes, because I was running two of my scripts just fine with this error, and became aware of it when I added the third which caused an extra FTP connection every 7 minutes. Thanks for the help - much appreciated! -
FTP Idle Connections
UnknownWarrior replied to UnknownWarrior's topic in AutoIt General Help and Support
I use the connection once every 6-8 minutes. Will connecting/closing every time cause a lot of extra load? -
FTP Idle Connections
UnknownWarrior replied to UnknownWarrior's topic in AutoIt General Help and Support
I do it at the end of my script (from what I interpretted from the HelpFile) -- which runs basically 24/7. Do I need to Open, FilePut, Close every single time I want to put a file on my server? -
Got a major dilemna, and after talking to my web hoster, they finally pinpointed the error -- my FTP connections aren't closing. I have $i_passive set to 1 (so it closes the connection afterward), but it still isn't. My web hosting only allows 25 open processes at a time, and I am running three AutoIt scripts on three separate machines (all Windows VPS). When I was running just two, it was fine, but when I added the third it seems to have breached that 25 limit. What the support told me was that when I was running two scripts, the processes eventually died out in time - therefore never reaching 25. Well, now with 3, they aren't dieing fast enough and is causing my server to crash. So my question is -- why aren't my FTP connections closing after I use _FTP_FilePut and what can I do so it closes the connections immediately?
-
I have a TrayTip I wait for in my Do Loop, I can see it with my own eyes AND AU3 Info is reporting back to me a handle and a title for the TrayTip.... But - no matter what method I try doing to see if that traytip exists, NOTHING works. Here's some failed attempts: $text = 1 Do If WinExists("[CLASS:tooltips_class32]", "") Then ExitLoop Else Sleep(500) EndIf Until $text = 10 Do $text = WinExists("[CLASS:tooltips_class32]", "") Sleep(100) MsgBox(0, "", $text) Until $text = 1 Do $text = WinExists("Link Check completed.") Sleep(100) MsgBox(0,"", $text) Until $text <> 0 Now, when I look at the TrayTip, visual title is "Link Checker", and the text is "Link Check Completed" -- but I'm just using what AU3 Info gives me and IT WON'T WORK!! Here's the Info: >>>> Window <<<< Title: Link Check completed. Class: tooltips_class32 Position: 1245, 807 Size: 170, 74 Style: 0x940006C3 ExStyle: 0x00080088 Handle: 0x00010068 Hopefully someone has an idea what's going on :/. Thanks!
-
I couldn't find anyone using this function on the forum, maybe because it isn't an AutoIt function? I've tried: _SQLite_Query(-1, "SELECT TOP(1) orderID FROM Table1 ORDER BY orderID;", $hQuery) Which says the function doesn't exists (top) and _SQLite_Query(-1, "SELECT TOP 1 orderID FROM Table1 ORDER BY orderID;", $hQuery) Which told me there was a syntax error by the "1" (being the TOP). Am I missing something here? I just want to grab the lowest orderID from my table :/. (I think I can use QuerySingleRow, but having this as an extra method would be nice).
-
Solved - delete
-
It's looking somewhat promising JohnOne actually. Some things from what I've seen so far: 1. http://msdn.microsoft.com/en-us/library/windows/desktop/ms632644%28v=vs.85%29.aspx <-- how do I get the lParam? Says I need a pointer to the window text? I was successful in sending the text to that Control though, but it's only sending a blank text. Code: Edit: Ptr("hey") didn't work either Local $hwnd = ControlGetHandle("Import", "", "[CLASS:Edit; INSTANCE:1]") _ToggleMonitor($hwnd) ;Local Const $WM_SETTEXT = 12 Func _ToggleMonitor($hwnd) Local Const $WM_SETTEXT = 12 Local Const $text = "hey" _SendMessage($hwnd, $WM_SETTEXT, 0, $text) If @error Then MsgBox(0, "_ToggleMonitor", "_SendMessage Error: " & @error) Exit EndIf EndFunc ;==>_ToggleMonitor 2. Is there anyway to click an option that doesn't have a ControlID/handle? There are certain drop down options in the program that I can't get the controlID of (such as Toolbar options - but it's not in the Toolbar)... Any ideas on how I could go about doing that? (that's the one downside of doing it this way versus actual Hooking -- in hooking we could just TELL the program to run the function that simulates clicking on that drop down option) 3. To click "Ok" on the MessageBoxes that come up during the program, I've been doing ControlClick (which has been giving those funny results as talked about earlier). I did find this: http://msdn.microsoft.com/en-us/library/windows/desktop/bb775985%28v=vs.85%29.aspx However, AutoIt says that we need a 'number' for the $iMsg parameter - and msdn isn't giving us a number for it. Any idea on what to use for the number? (I suppose I could just try doing the LBUTTONDOWN and LBUTTONUP messages, but this seems a bit more efficient) Edit: As a side note: Been doing a lot more search on SetWindowsHookEx. This seems to be the more appropriate thing for what I want to accomplish. Although the SendMessage is doing what I asked for in the thread, it seems to be doing exactly what ControlClick/ControlSend does (maybe they are exactly the same thing too). Some useful functions I did find were: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644987%28v=vs.85%29.aspx (monitor IF a message box comes up... then do another action) http://msdn.microsoft.com/en-us/library/windows/desktop/ms644981%28v=vs.85%29.aspx and especially: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644975%28v=vs.85%29.aspx I'm just pretty illiterate on how DLLs work though, so I don't think I could be able to do this .
-
I'll take a look at that... I've done a little bit of assembly with AutoIt using NomadMemory, maybe I'll strike it lucky. I did actually look at SendMessage once, but I didn't know what to use $iMsg parameter. In the HelpFile, they only give: _SendMessage($hwnd, $WM_SYSCOMMAND, $SC_MONITORPOWER, $OnOff)... Which is fine and dandy that $WM_SYSCOMMAND and $SC-MONITORPOWER happen to be built into AutoIt already... so where would I go to find my values to be plugged into there (or is it not possible as you stated because everything on SendMessage is stuff built into AutoIt?)?