Jump to content

Need some help with _FFCmd


Recommended Posts

Hi there all!

I'm trying to get this script to work but I'm short of knowledge, it seems. If FF is connected to a certain paige I wan't something to happend and if it's connected to a not specified paige I wan't something else to happend. Could someone, please, help me out.

#include <FF.au3>

_FFConnect()

If _FFIsConnected() Then
    $sTitle = _FFCmd(".title")
    If $sTitle = "Google" Then MsgBox(64, "", "This is a search engine.")
ElseIf $sTitle = "AutoIt Forums" Then
    MsgBox(64, "", "This is where all the magic happends.")
ElseIf $sTitle = "Some other .title than the above" Then
    MsgBox(64, "", "You are way off.")
EndIf
Link to comment
Share on other sites

Looks like your nested If block of code is not correct so I modified it. :mellow:

Put your else code where I show the comment.

#include <FF.au3>

_FFConnect()

If _FFIsConnected() Then
    $sTitle = _FFCmd(".title")
    If $sTitle = "Google" Then
        MsgBox(64, "", "This is a search engine.")
    ElseIf $sTitle = "AutoIt Forums" Then
        MsgBox(64, "", "This is where all the magic happends.")
    ElseIf $sTitle = "Some other .title than the above" Then
        MsgBox(64, "", "You are way off.")
    Else
        ; Add code here to do something else
    EndIf
EndIf
Link to comment
Share on other sites

Looks like your nested If block of code is not correct so I modified it. :mellow:

Put your else code where I show the comment.

Me and If statements are not friends. I dont like them and they don't like me. :(

Thanks a bunch!

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...