Jump to content

How to use GOTO like Function in my script


Recommended Posts

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
Link to comment
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...
Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

:D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...