|
-
Apr 19th, 2008, 01:17 PM
#1
Thread Starter
Lively Member
[2008] Sendkeys sends key 2 times Q.
the thing is that Im trying to open new tab in firefox(CTRL+t), but for some weird reason instead it opens 2 tabs yet the code looks like this:
Any idea how can i send this 1 time?:
sendkays code:
Code:
SendKeys.SendWait("^(t)")
Fulll code:
Code:
'' Check if firefox is running & open new tab
''----------------------------------------------
Dim ProcessList As System.Diagnostics.Process()
ProcessList = System.Diagnostics.Process.GetProcesses()
Dim Proc As System.Diagnostics.Process
For Each Proc In ProcessList
If Proc.ProcessName.ToLower = "firefox" Then
'MsgBox("Name {0} ID {1} " & Proc.ProcessName & " " & Proc.Id)
AppActivate(Proc.ProcessName)
SendKeys.SendWait("^(t)") ' open new tab
Exit For
End If
Next

M.V.B. 2008 Express Edition
-
Apr 19th, 2008, 02:19 PM
#2
Re: [2008] Sendkeys sends key 2 times Q.
Hi,
Could it be possible that, when you opens Firefox it has already one tabpage and then with your app. it fires again and create a second tabpage.
Just a thought.
Wkr,
sparrow1
-
Apr 19th, 2008, 02:49 PM
#3
Thread Starter
Lively Member
Re: [2008] Sendkeys sends key 2 times Q.
well in the current code the firefox is already open, so I make firefox window active & send CTRL+t to open 1 more tab & according to code it should send CTRL+t 1 time. but the thing is that it sends it 2 times. & instead of 1 2 tabs are opened.

M.V.B. 2008 Express Edition
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|