Jump to content
Sign in to follow this  
Jfish

Can't get _FFTabSetTabSelected to work as expected

Recommended Posts

Jfish

I recently had issues with the >_FFTableWriteToArray which turned out to be a bug with the function.  I am having troubles again, but with a different FF function for the _FFTabSetSelected.  The documentation for this function is contained in the attached picture (and below).  Again, this is probably on me but I appreciate the help as I can't tell what I am doing wrong.  It seems like the first parameter for this function can be a name or index of the tab and the second can be the parameter type.  I also assume that if there is only one instance of FF open you can leave _FFWindowSelect() void of parameters and still select a tab.  I also expect that if you if the function works it will select the tab and make it the active tab.

My problem: the code only works if I manually select that tab.  If another tab is selected it will crash.  I can't get this function to work.

documentation:

$vTab   
(Optional) Label, index (0-n) or keyword:
0   = (default) index (0-n) of the tab.
prev    = next tab.
next    = previous tab.
first   = first tab.
last    = last tab.

$sMode  
(Optional) Selection mode:
index   = (default) index (0-n) of the tab.
label   = Label (RegExp) of the tab.

I am trying to use the label as the first parameter.  I have tried this approach with the second parameter

$name="3Dcart v6.4.1 Store Manager"
_FFConnect()
_FFWindowSelect()
$setTab=_FFTabSetSelected($name,"label")

and without

$name="3Dcart v6.4.1 Store Manager"
_FFConnect()
_FFWindowSelect()
$setTab=_FFTabSetSelected($name)

No joy.  Any help would be greatly appreciated.

post-24738-0-85928600-1413886686_thumb.j


Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Share this post


Link to post
Share on other sites
Danp2

Run your script and post the results from the Scite output window. For a more detailed look, add the following line at the top of your script:

$_FF_COM_TRACE = True

Edit: Looks like this is your issue --

$name="3Dcart v6.4.1 Store Manager"

It doesn't work because the first word should be "3DCart", not "3Dcart".

Edited by Danp2

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  

  • Similar Content

    • tommytx
      By tommytx
      ConsoleWrite("Hello Dolly on Line 1" & @CRLF) #include <IE.au3> ConsoleWrite("Hello Dolly on Line 5" & @CRLF) Local $oIE = _IECreate("www.autoitscript.com") ConsoleWrite("Hello Dolly on Line 10" & @CRLF) Can anyone put me on the right track to troubleshoot this one.. the IE browser is not opening.. it is not my primary browser since FF is but that has not been a problem in the past.. it all seems to work including compile but the generation of the IE browser.. Never had any problem before.. below is the results of the run.. any ideas on where I might look.. that is the only error i get and its only after a 30 second delay.. I suppose a time out..
       
      ; >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "G:\show_pos.au3\test.au3"
      ; Hello Dolly on Line 1
      ; Hello Dolly on Line 5
      ; --> IE.au3 T3.0-2 Error from function _IECreate,  (Browser Object Creation Failed)
      ; Hello Dolly on Line 10
      ; >Exit code: 0    Time: 30.46
       
    • ohaya
      By ohaya
      Hi,
      I am still really new with AutoIT.  We are using it to automate logging into web sites and I have encountered problems with focus.  The target web page is configured to put the cursor into the first text field (username) when the page is loaded, and when I run the AutoIT script, which does the log in seems like it is just not starting where I expect it to be.  
      I have been kind of using ToolTip() to kind of help with debugging, but now I am wondering if the calls to ToolTip() are causing the focus to be messed up.  
      For example, at least visually, when the ToolTip() is called, I can see the cursor disappear from the web page text field and they when I do anything that is supposed to send keystrokes, they are going off somwhere else ("never-neverland").
      But when I remove some of the ToolTip() calls, it works correctly.
      So the questions I have are:
      1) Do the ToolTip() calls interfere with/change where the focus on the target page are?
      2) In general, what are the "rules" for where ToolTip can be used "safely" (== doesn't interfere with focus)?
      Thanks,
      Jim
       
    • FroVN
      By FroVN
      I made a software that download music and play it, but i have an idea , listen music online when we have internet connectionm ,no need for download any more, so i want to connect to soundclound but if wan to do that i need  to open google chrome , so is there any way to open that in hide and not show on taskbar? sorry for my bad english
    • MakzNovice
      By MakzNovice
      Hello Experts,
      I am working on modifying table data of a browser currently in IE (soon in FF)
      My sequence of operations:
      1. Activate Browser
      2. Get Browser table
      3. Modify data  in table
      4. Suppress any warning/error message from webpage
      5. Activate the Webpage again 
      6. Send {F11} key sequence twice to achieve some update without Updating form ( {F5})
       
      My problem is at Step 5, as it activates the wrong window ( last used application rather than my browser window)
      My code snippet for it as follows
      $bFoundWindow = False Local $aList = WinList("[REGEXPTITLE:(?i)(.*Internet Explorer.*)]") Local $hWND = 0 For $i = 1 To $aList[0][0] If False = $bFoundWindow And $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 1) Then WinActivate($aList[$i][1]) ; 1. Activate Browser window WinSetState ( $aList[$i][1], "", @SW_MAXIMIZE) $hWND = $aList[$i][1] $objEditIE = _IEAttach ($aList[$i][1], "hwnd") $oTitles = _IETagNameGetCollection($objEditIE, "TITLE") For $oTitle In $oTitles $sTitle = $oTitle.innerText If $sTitle = $searchString Then MsgBox(0,"APPLICATION Found", "Got Edit List Window", 1) $bFoundWindow = True ExitLoop EndIf Next EndIf Next If False = $bFoundWindow Then MsgBox(0,"Error","Please launch Edit window for updating values in Browser prior to script execution",10) Exit EndIf ; MY CODE HERE TO MODIFY TABLE ; 2. Get Browser table ; 3. Modify data  in table ; Check if message from webpage pop-up window exists if so click ok on it Local $nCounter = 0 Local $nMaxCounter = 5 while 1 If WinExists("Message from webpage","") Then ControlClick("Message from webpage","","Button1","primary",1) ;4. Suppress any warning/error message from webpage Else $nCounter = $nCounter + 1 Sleep(100) ;MsgBox(0,"Counter", $nCounter, 1) If $nCounter = $nMaxCounter Then ExitLoop EndIf WEnd ;5. Activate the Webpage again  WinActivate($hWND) ; have already tried WinActivate($aList[$i][1]) but no success ;6. Send {F11} key sequence twice to achieve some update without Updating form ( {F5}) Send("{F11}") WinActivate($hWND) ;WinActivate($aList[$i][1]) Sleep(100) Send("{F11}") Any support will be highly appreciated
    • MakzNovice
      By MakzNovice
      I am using FF.au3, Since its proprietary I can't share image or link for the data I am using.
      But here is my problem abstract code .
      ; Test if I get table contents correctly
      ;$sCurr= _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]", "textContent")
      ;MsgBox(0, "Current Value ", $sCurr, 2) ; output " -254.4"
      $sObj = _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]")
      MsgBox(0, "Object", $sObj, 2) ; output "OBJECT|FFau3.xpath"
      $sRet = _FFObj($sObj, "value", "-253.4")
      MsgBox(0, "Return Value", $sRet); output " -253.4"
      $s = _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]", "textContent")
      MsgBox(0, "New Value", $s); output " -254.4"
      My expectation is that that last MsgBox shows new value that I had set that is "-253.4"
      I would highly appreciate any support on this
       
×