Jump to content

Little help with my job script


Recommended Posts

Hello guys,

I am quiet new here and most important only beginner in scripting.

One part of my work in my job is inserting pretty much the same information into Web Application of my company.

So I made simply mousle click script and it kinda worked. Few colleagues saw it and they want this script too,  so I decided to improve it and make it more suitable and better for other computers.

Mostly i removed mouse click and things that can make some errors for other users.

I made it slowly but quiet good, but i have one problem on the end of process. In Web app i have 3 bookmarks (Page 1,2,3 -The green ones). Every bookmark has own yellow fields where i am inserting required data. I find out that i can move through yellow fields just by Tab key, but my problem is I am unable to move/switch without mouse click to other green bookmarks and to get acces to "page2" yellow fields. 

This web app is running on Mozilla Firefox, so my attempt to get information from Autoit window info failed (I got only information about the page)

So i would like to ask you guys, is there any way to do ControlClick just by knowing the name of the bookmark ?(because all my attempts and searching for answers failed)

Or any way how to press that green bookmark without using Mouse Click and only knowing the name of Bookmark

I would be thankful for any help or advice.

Have a nice day and thanks for any help! :)

Here is Example i made how it looks like (I have restriction of putting screens of real app)

Example1.thumb.jpg.2ebd093f4d206801dee4c

Ps. not sure if it helps but this web app has searh tool and after typing "page2" it will highlight the bookmark. (Then it is possible copy the name, but nothing like enter ot etc is not working even if the bookmark is highlight.

 

 

 

 

 

 

Link to comment
Share on other sites

if it is web based and you can open it with Internet explorer then you will need to eat up the IE related functions examples in the help file,that is probably the best way to go, its not going to be easy if you are new, so prepare to spend a lot of time on it if you want to get anywhere, but once you get it to work its fun!

Link to comment
Share on other sites

wheres your code???

Sorry, here it is. Its only part of whole code. This part is for Autofill information to this WebApp. Dont know why but i cant post it here through the  "add code" function so this is only way it works for me. Hope its fine.

HotKeySet("{ESC}", "Terminate")
Opt("WinTitleMatchMode", 2)
Opt("MouseCoordMode",0)

Global $Data1
Global $Data2

$Data1="Text that is different" ;first variability
$Data2="Text that is different"  ;second variability

CREW()

Func CREW()
WinActivate("Process Workspace for Process") ;this open my active Mozilla with app
Send("Process Type") ;this highlight text before my first empty field, from this point i navigate through fisrt bookmark press Tab key
Send("{Enter}")
Send("{TAB}")
Send("{down 2}")
Send("{Enter}")
Sleep(1500)
Send("{TAB}")
Send("Same text I insert everytime") ;Same text every time I fillin this app
Sleep(200)
Send("{Enter}")
Send("{TAB}")
Send("Same text I insert everytime") ;Same text every time I fillin this app
Sleep(200)
Send("{TAB 5}")
Send("{Delete}")
Send("Same text I insert everytime") ;Same text every time I fillin this app
Sleep(500)
Send("{Enter}")
Send("{TAB 2}")
;here insert date from Lotus Notes (working on it in another script)
Send("{TAB}")
Send("{Delete}")
Send("Same text I insert everytime")
Sleep(500)
Send("{Enter}")
Send("{TAB}")
;here insert date from Lotus Notes (working on it in another script)
Send("{TAB}")
Send($Data1) ;Only this text change in inserting info to app
Send("{TAB 4}")
Send($Data2) ;Only this text change in inserting info to app
Send("{TAB}")
Send("{alt}")
Send("Document Type") ;Same text every time I fillin this app
Send("{TAB}")
Send("{down 2}")
Send("{Enter}")
;------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>> Here I need some way to move to second bookmark to continue in process.
EndFunc


Func Terminate()
Exit 0
EndFunc

  

if it is web based and you can open it with Internet explorer then you will need to eat up the IE related functions examples in the help file,that is probably the best way to go, its not going to be easy if you are new, so prepare to spend a lot of time on it if you want to get anywhere, but once you get it to work its fun!

(Problem is I can open it only with Mozilla Firefox :/)

My bad I find out that is possible to run it with Internet explorer too

 

Code.au3

Edited by AnakondaSK
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...