Sign in to follow this  
Followers 0
sathish

How to use GOTO like Function in my script

7 posts in this topic

#1 ·  Posted (edited)

Here is my code

#Include <FF.au3>

If _FFConnect() Then
    If _FFOpenURL("https://www.google.co.in/mobile") Then
        ;MsgBox(64,"","www.google.de is loaded")
        $sHTML = _FFReadHTML()

        If StringInStr($sHtml,"<form name=""LoginForm"" ") Then
            ;MsgBox(64,"","Logged into site")
            _FFSetValue("zesathish", "userName", "name")
            _FFSetValue("neeta12sa", "password", "name")
            _FFClick( _FFXPath("//input[@type='image' and @src='/mtpsimages/go.gif']", "", 9 ))
            _FFLoadWait()
            $sHTML1 = _FFReadHTML()
            If StringInStr($sHtml1,"Enquiry") Then
                MsgBox(64,"","Site ERROR")
            Else
                MsgBox(64,"","Site ERROR")
            EndIf
        Else
            MsgBox(64,"","Site ERROR")

        EndIf

    Else
        
        MsgBox(64,"","SITE ERROR")
    EndIf

    ; Opens the browser-history in the current tab
    ;_FFOpenURL("chrome:history")
Else
    MsgBox(64,"Error","Can't connect to FireFox")
EndIf

In my script wherever "Else" is used there and all i need to start the script from first line

Is it possible, Like using GOTO option in other scripting languages

Edited by sathish

Share this post


Link to post
Share on other sites



Here is my code

<...>

In my script wherever "Else" is used there and all i need to start the script from first line

Is it possible, Like using GOTO option in other scripting languages

You may want to remove your username and password from your posted script. And site auto login methods are against the forum rules...

Share this post


Link to post
Share on other sites

There is no "Goto" in AutoIt. Use a While / WEnd loop and exit if needed.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks for the support, problem solved, i used Function (subroutines)

Share this post


Link to post
Share on other sites
:D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I used IE.au3 a lot in my scripts

In that i have come across a command which will click the visible text in webpage

_IELinkClickByText ($oIE, "Display Settings:")

Is there any command similar in FF.au3,

I studied the document too, regarding FF.au3 (http://english.documentation.ff-au3.thorsten-willert.de/)

I tried some commands but not working, any suggestions will be grateful for me

My visible text is "DISPLAY SETTINGS:" which is enclosed in <a href="sss111" class="producthead">DISPLAY SETTINGS:</a>

where the href value will change for each instance

Share this post


Link to post
Share on other sites

Please somebody suggest me, what is the equivalent command for _IELinkClickByText ($oIE, "Display Settings:") in FF.au3

I searched almost all related FF.au3 (I hope so), For the past three days I am searching but I can't able to find

Two things are eating my brain

1. _IELinkClickByText ($oIE, "Display Settings:") in FF.au3

2. In IE.au3, How to insert input button, when there is no form name

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
Sign in to follow this  
Followers 0