4 posts in this topic
I have a working script that changes the core affinity and process priority of multiples of a specific application I have running.
I have that part figured out.
I would like to make a little modification to it.
Windows10 introduced virtual desktops. I am trying to have different core affinity and priority of processes on the visible and non-visible desktops.
What I need is a bool function that could be described as IsWindowOnCurrentDesktop($hWnd). I have searched the winAPI.au3 but I do not believe anything like that exists built it.
I have searched multiple places before asking for help. I found a Microsoft supplied example of the function I need using C#, but I am unfamiliar with C# to a degree that I cannot port the system call over.
Help is appreciated but not expected. Thanks in advanced. In the meantime I will be learning C# syntax and class structure.
I have a question related to _IEFormElementOptionSelect in the reference file. This drop down contains three items; Homepage, Midipage, Freepage.
How can I get the name of these items? If I use .innertext, in another drop down list contains spaces, so I cannot split them.
; Open a browser with the form example, get reference to form, get reference ; to select element, cycle 10 times selecting options byValue, byText and byIndex #include <IE.au3> Local $oIE = _IE_Example("form") Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm") Local $oSelect = _IEFormElementGetObjByName($oForm, "selectExample") _IEAction($oSelect, "focus") For $i = 1 To 10 _IEFormElementOptionSelect($oSelect, "Freepage", 1, "byText") Sleep(10) _IEFormElementOptionSelect($oSelect, "midipage.html", 1, "byValue") Sleep(10) _IEFormElementOptionSelect($oSelect, 0, 1, "byIndex") Sleep(10) Next _IEQuit($oIE) ;== Question == $aItems = StringSplit($oSelect.innerText, " ") For $i = 1 To $aItems - 1 ConsoleWrite("Item-" & $i & ": " & $aItems[$i] & @CRLF) Next
I am trying to extract a date and time from a website using InetRead. The source for the page I am reading shows the date and time as shown below. I need to somehow extract the correct date and time from this information. Is there a function or calculation that will do this? The source shown here correlates to 15:20 (time) 29.03.17 (date).
<div class="cell game-date" data-time="1490818800000"> <div class="site__time" data-time="1490818800000"> <div class="time"></div> <div class="date"></div> </div> </div>
I'm trying to use InetGet function to download multiple images from a website, some pages having three images, some pages having 4 images some of them having more...
I wrote belong codes to work with autoit and having issues when autoit find not matching url available then autoit just script stopped without any error and I just want to same all the avaialble images on the website if links are not more left then script should moves on but script just stopped...
Here is complete scenerio
I've so many webpages with random number of images are hosting on those pages, in below code, InetGet able to download first three files easily and when it reaches to 4th link that is missing on the webpage that's why script stopped just but I want autoit to download only those images those are links are available and rest of files needs to be skipped automatically for this page if on the next page 4th link of image avaiable then autoit script needs to download 4th one also.
Furthermore, please help me to download files with it's original names instead of whatever name I want to same them like in InetGet I've to give some name to the file that I'm willind to download instead of original name that is available online.
Please Help me.
Here i my code;
$File6 = @ScriptDir & "\images_source.txt" $txt6 = FileRead($File6) $target_source7 = _StringBetween($txt6, 'src="', '"') if Not @error Then InetGet ( $target_source7, @ScriptDir & '\Description\Image1.jpg'); 1st image download coz link is available InetGet ( $target_source7, @ScriptDir & '\Description\Image2.jpg'); 2nd image download coz link is available InetGet ( $target_source7, @ScriptDir & '\Description\Image3.jpg'); 3rd image download coz link is available InetGet ( $target_source7, @ScriptDir & '\Description\Image4.jpg'); 4th image not able to download coz link is not available and script just stopped EndIf
Does anybody know how I would go about getting the window title bar colour on Windows 10? I tried using _WinAPI_GetSysColor, and manually reading the registry (HKCU\Control Panel\Colors, ActiveTitle) but in either case I get the same (0x99B4D1, wrong) result.
RegRead('HKCU\Control Panel\Colors', 'ActiveTitle') ; Returns 153 180 209 (aka 99B4D1) _WinAPI_GetSysColor ($COLOR_ACTIVECAPTION) ; Returns 0xD1B499 (aka 99B4D1)