Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Software FAQs, Solutions, Tutorials


Reply
 
Share Thread Tools Display Modes
Old 08-27-2009, 01:59 PM   #1
Low Bitrate
 
Join Date: Jul 2008
Posts: 63
prodigalsun is an unknown quantity at this point
Autoit Script Build - Help needed!

Ok so i have been reading thru the Autoit tutorials in an attempt to write 2 sets of scripts. The first set of for mymobiler - need a .exe that will connect and one for disconnecting to my phone. The other is for pdanet to do the same. Both programs reside in the taskbar and can connect by double clicking on the icons. I'm trying to write these scripts to map buttons in Centrafuse that are more touch friendly. Can anyone provide me with some pointers?
prodigalsun is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 09-08-2009, 12:55 PM   #2
Low Bitrate
 
Join Date: Jul 2008
Posts: 63
prodigalsun is an unknown quantity at this point
No one?
prodigalsun is offline   Reply With Quote
Old 09-09-2009, 05:13 PM   #3
Low Bitrate
 
Join Date: Jul 2008
Posts: 63
prodigalsun is an unknown quantity at this point
Yeah!

Ok found a solution in case any one has similar needs. This script will double click on the PdaNet tray icon which initiates it to connect.

Code:
#Include <GuiToolBar.au3> Global $hSysTray_Handle, $iSystray_ButtonNumber Global $sToolTipTitle = "PdaNet" ; <<<<<<<<<<<<<<<< Enter some tooltip text for the icon you want here $iSystray_ButtonNumber = Get_Systray_Index($sToolTipTitle) If $iSystray_ButtonNumber = 0 Then MsgBox(16, "Error", "Icon not found in system tray") Exit Else Sleep(500) _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "left") _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "left") EndIf Exit ;............ Func Get_Systray_Index($sToolTipTitle) ; Find systray handle $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') If @error Then MsgBox(16, "Error", "System tray not found") Exit EndIf ; Get systray item count Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) If $iSystray_ButCount = 0 Then MsgBox(16, "Error", "No items found in system tray") Exit EndIf ; Look for wanted tooltip For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1 If StringInStr(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber), $sToolTipTitle) = 1 Then ExitLoop Next If $iSystray_ButtonNumber = $iSystray_ButCount Then Return 0 ; Not found Else Return $iSystray_ButtonNumber ; Found EndIf EndFunc

I got most of the code from the Autoit forums and made 2 small changes. It can also be used for other programs. For example I'm using it for My Mobiler also. Now I can just map these to a centrafuse button.

Last edited by prodigalsun; 09-09-2009 at 05:17 PM.
prodigalsun is offline   Reply With Quote
Old 09-09-2009, 09:32 PM   #4
Low Bitrate
 
Join Date: Jul 2008
Posts: 63
prodigalsun is an unknown quantity at this point
Ok i spoke too early. The script above only works if you can actual see the system tray icons so for it to work i have to minimize centrafuse. I may just leave it like that... at least now I have a much larger icon. To fully achieve was I was trying to do I'd just need to add lines in the script to minimize centrafuse --> run the current script --> maximize centrafuse.
prodigalsun is offline   Reply With Quote
Old 09-09-2009, 09:52 PM   #5
Variable Bitrate
 
pcpete's Avatar
 
Join Date: Mar 2008
Location: Toronto Canada
Posts: 435
pcpete is on a distinguished road
Good stuff man! I think I'll give it a try, sometimes I have to minimize RR, and select connect on the pdanet systray icon, this would definately make that easier....

I wish these utilities came with hotkey support or and sdk , would make our lives alot easier....
pcpete is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SARRAH Team Dropping By (consumer build advice needed) SARRAHTEAM Newbie - Proposed setup 10 06-23-2009 08:02 PM
First CarPC Build Badams Newbie 2 06-08-2009 11:22 AM
Microtech Dash AutoIT Script mukow RR Plugins 4 01-13-2009 06:44 PM
AutoIt to check label "TIME" Automatic Background Changer MGD Road Runner 50 10-01-2008 04:39 PM
*** NEW MJS BUILD OF RR *** (Resume Test 3) mitchjs Road Runner 8 09-23-2008 09:10 AM



All times are GMT -5. The time now is 09:32 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics