AnakondaSK

Little help with my job script

4 posts in this topic

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.

 

 

 

 

 

 

Share this post


Link to post
Share on other sites



wheres your code???


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
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

  • Similar Content

    • thoms
      By thoms
      Hello Forum,
      As said in the title, I'm searching a way to disable all tabstops in a GUI. My GUI includes 15 buttons and 3 edit controls.
      My questions:
      - is there a way to disable all tabstops at a time
      - is there a way to list all controls of a GUI and then disable tabstops one by one
      - or should I use the following line after each button creation:
      _WinAPI_SetWindowLong(GUICtrlGetHandle(-1), $GWL_STYLE, BitAND(_WinAPI_GetWindowLong(GUICtrlGetHandle(-1), $GWL_STYLE), BitNOT($WS_TABSTOP))) Thanks in advance for your valuable help!
      Thoms
      Edit: or maybe disable TAB key? I don't remember how to do!
    • lattey
      By lattey
      I used the window info tool to get what I've got below, but it just doesn't click the button. I run the script, nothing happens. 
      WinActivate("SELECTION") Sleep(200) ControlClick("SELECTION", "", "[CLASS:Button;INSTANCE:2]") i think maybe the autoit cannot detect the windows. So what i do:
       
      MouseClick( "", 503, 500) local $blanktitle = WinGetTitle("[ACTIVE]") If StringInStr($blanktitle, "SELECTION") Then msgbox("","", "got") WinActivate($blanktitle) ControlClick($blanktitle, "", "[CLASS:Button;INSTANCE:2]") Endif The script can detect the windows as the it is prompt "got" message. But it just doesn't click the button.
      Please help.
      Thanks for any help you can offer.
    • AppSoftwareVld
      By AppSoftwareVld
      Hello,
       
      I need this for a project and I don't find a method for the next problem.
      I want when I click a button to create a variable ("$variable1") so if I press one more time to create one more ("$variable2") and create more and more how many times you press the button.
       
      Do you have an idea ? 
      Thank you for your attention !
    • rte7
      By rte7
      Hello. We work with the BMC Remedy site to manage incidents and would like to automate the processes of clicking through this button code:
      <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> I use firefox with mozrepl and autoit with include FF.au3
      I need your help
      I read the topic https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/ but I could not run the code from the listed commands
      ...
      It is necessary to press the button and from the list of the menu of cahorsations to select the item = "zone of trust abonent"
      Screen # 1 http://joxi.ru/52aJK7bh4a7ypA or below.
      1) Press button
      <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a>
      2) After pressing the button, I need to choose in this menu of 4 items to select an item called "zone of trust abonent", Screen # 2 - http://joxi.ru/p27gwQKHo71VQ2
      html code table items
      <table class="MenuTable" cellpadding="0" cellspacing="0" style="width: 179px;"> <tbody class="MenuTableBody"> <tr class="MenuTableRow"> <td class="MenuEntryName" nowrap="">zone of trust abonent</td> <td class="MenuEntryNoSub" arvalue="zone of trust abonent"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust operator"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust third operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust third operator"></td></tr> <tr class="MenuTableRow"><td class="MenuEntryNameHover" nowrap="">No settings</td> <td class="MenuEntryNoSubHover" arvalue="No settings"></td> </tr> </tbody> </table>
       
       
      More in detail, I choose from the menu item "zone of trust abonent" Screen # 3 - http://joxi.ru/GrqVq4ZIQEPW4m

       
      3) The choice is made, Screen # 4 http://joxi.ru/v297w6aC3PovLr
      <textarea class="text sr " wrap="off" id="arid_WIN_0_1000002488" cols="20" maxlen="60" style="top:21; left:0; width:179; height:21;" armenu="CFG:PRC:CategoryHPD-Res-T1-Q" mstyle="2" arautoc="1" arautocmb="1" arautocak="0" arautoctt="400" rows="1"> </textarea>
       
      It's all. I would be very grateful to you =) !!!!!!!!!!
      Here are more detailed codes in the attachment. 
      button1.txt
      menu - table.txt
      all.txt
    • Nareshm
      By Nareshm
      I create message box but i dont know how to add button action when i click it.

      Help for : Add script for Button : Left, Right, Right Finger
      example when i press Left finger button do Case $idNotepad
                      $iPID = WinActivate ( " :PS :: Version - 2.8.0.0  - [eFS Bill]")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:btnReset]", "{esc}")
                              ControlClick ( " :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]")
                              ControlSend(" :DS  - eF:: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "^v")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "{enter}")
      How to add like above ?
                    
                                                                sorry for my bad english