Jump to content

Recommended Posts

Posted

I am new to AutoIT but I do use Sikuli.  Decided to use AutoIT for  this project as all  the required can be created in an .exe file, does not  need Java like Sikuli.

Also  which can be pushed to tool bar of Windows 10 desktop.

Our users will interact with a client/server application and normally work on dual screen. The script needs to detect the c/s application from the dual screen,  needs to do three mouse clicks based of image/pixel comparison, will need to wait till the  click object is available and then finally take screen capture  of the top 40 rows  and save the .jpeg file to  windows file share location.

once the file save is completed,  pop up message - the screen capture is completed. Then the users can do their regular work.

Potentially  other factor that will play are the screen resolution.

Can anyone guide me to some relevant scripts already in the forum. In the meantime I am learning  the basics of the  tool.

 

Appreciate feedback and any help

George V

 

 

Posted (edited)

Hello and welcome to AuoitScript forum

 

well not even difficult... 

btw i don't use windows 10

i just have some questions:

When they got a secondary screen, you need the full range ? i mean full desktopwidth or you just need screencapture 1 screen? When which?

I would need more informations ... like which pixel u need or which mouseclicks... is it on desktop or in an application and so on... a screenshot would be nice

i dont know what you mean with save to windows file sharing because i never used...

unfortunately there is no way to capture "rows" but you could it handle with pixels

Problem would be when they have different resolutions ... so you have to compare it to the "rows"

 

at least i hope you know nobody will give you a finished script for this... so you have some starts? some code? i mean it's just a forum and we are ready to help but not to work for you :naughty: Hope you dont get me wrong for this :P 

 

Here is an example to get resolutions for all Displays .. but it works with powershell and i dont know if this works on Win 10 (would be nice to know :) )

(you need to DL the file and get this in same folder)

#include <Array.au3>
_ArrayDisplay (_get_screen_info())

Func _get_screen_info()
Dim $displayresolutions[0][0]
If IsAdmin ( ) Then

FileInstall ( @ScriptDir & '\screens.ps1',@ScriptDir & '\screens.ps1',0 )

Do
    Sleep(100)
Until FileExists("screens.ps1")

If FileExists("screens.txt") Then FileDelete("screens.txt")
Do
    Sleep(100)
Until FileExists("screens.txt") <> 1

RunWait(@ComSpec & ' /c PowerShell.exe -ExecutionPolicy Bypass -File "' & @ScriptDir & '\screens.ps1"', "", @SW_HIDE)

Do
    Sleep(100)
Until FileExists("screens.txt")

Local $lines = FileReadToArray("screens.txt")

_ArrayDelete($lines, UBound($lines) - 1)

For $i = 0 To UBound($lines) - 1
    ReDim $displayresolutions[UBound($displayresolutions) + 1][3]
    Local $array = StringRegExp($lines[$i], "[A-Z]+[0-9]", $STR_REGEXPARRAYGLOBALMATCH, 1)
    $displayresolutions[$i][0] = $array[0]
    Local $array = StringRegExp($lines[$i], "\s[0-9]+", $STR_REGEXPARRAYGLOBALMATCH, 1)
    $displayresolutions[$i][1] = $array[0]
    $displayresolutions[$i][2] = $array[1]
Next
Return $displayresolutions
Else
    SetError ( -10,0,-10 )
    Dim $errorreturn = "no admin rights"
    Return $errorreturn
EndIf
EndFunc

screens.ps1

Edited by Aelc

why do i get garbage when i buy garbage bags? <_<

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...