; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template AutoIt script.
;
; ----------------------------------------------------------------------------
; Script Start - Add your code below here
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template AutoIt script.
;
; ----------------------------------------------------------------------------
; Script Start - Add your code below here
opt("wintitlematchmode",2)
;With the "autoit Windows info tool", confirm the name of your blackberry
;desktop manager window. Mine was called just that, and yours
;probably is also. If it is not, then enter the name below, where I
;entered the name. IT MUST MATCH EXACTLY THE NAME OF THE WINDOW
$BB=winexists("BlackBerry Desktop Manager")
;Do the samething for the Internet Explorer Window that you did for
;the Blackberry Manager Window.
$ie=winexists("Microsoft Internet Explorer")
opt("wintitlematchmode",3)
;And again for the Command prompt window
$CMD=winexists("C:\WINDOWS\system32\cmd.exe")
Select
case $bb=0
;This is where the path for the Blackberry Desktop manager goes. Make sure
; all references are the same
run("C:\Program Files\Research In Motion\BlackBerry\DesktopMgr.exe")
opt("wintitlematchmode",3)
winwait("Connected - BlackBerry Desktop Manager")
sleep(1000)
winwait("Connected - BlackBerry Desktop Manager")
case $bb=1
opt("wintitlematchmode",3)
winwait("Connected - BlackBerry Desktop Manager")
sleep(1000)
winwait("Connected - BlackBerry Desktop Manager")
endselect
select
case $cmd=1
; This the window name of the cmd window you determined with the
; autoit window info tool. Make sure all references are the same.
winactivate("C:\WINDOWS\system32\cmd.exe")
sleep(1000)
send("exit")
send("{enter}")
sleep(1000)
run("cmd.exe")
sleep(1000)
send("cd\")
send("{enter}")
; this is the name of the DUN connection link. Notice there is no path. None
; is needed because the commands above force the CMD window to the root
;drive. Make sure all references are the same.
send("BB.lnk")
send("{enter}")
case $cmd=0
run("cmd.exe")
sleep(1000)
winactivate("C:\WINDOWS\system32\cmd.exe")
send("cd\")
send("{enter}")
send("BB.lnk")
send("{enter}")
endselect
opt("wintitlematchmode",3)
winactivate("Connecting Blackberry Connection...")
winwaitclose("Connecting Blackberry Connection...")
sleep(5000)
winactivate("C:\WINDOWS\system32\cmd.exe")
sleep(5000)
; this is the name of the IE link. Notice there is no path. None
; is needed because the commands above force the CMD window to the root
; drive. Make sure all references are the same.
send("IE.lnk")
send("{enter}")
sleep(5000)
winactivate("C:\WINDOWS\system32\cmd.exe")
send("exit")
send("{enter}")
Bookmarks