AutoHotkey Community

It is currently May 27th, 2012, 11:16 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: March 11th, 2006, 7:37 pm 
Offline

Joined: December 18th, 2005, 5:40 pm
Posts: 234
Location: Italy - Galatro(RC)
New version, v0.5beta. See last post for changes(many).

N.B.: for now only Sony Ericsson models are supported
The application at the end of this post let's you control your PC over BlueTooth. By clicking with right mouse button on tray icon and pressing Configure, you can add new program or modify existing ones. For now you can only use Send and Run command(and you can do almost anythong with them). To enable/disable the application, double click on tray icon.
Every time you send a command, an OSD show you wath you're doing.
If you use your keyboard and not the phone, don't forget to disable the program(also with CTRL+ALT+d)
Then re-enable it. I'll make later possible to disable/enable the program from the phone itself


This topic start from the need to use my BT phone to manage my computer.
I'll wait for AHK to natively support BT if the authors want it, but for now this solution works very well.

This is the method to control a PC via Bluetooth with FMA and AHK:

1)Download FMA here

2)Install it

3)Save this script in [FMAInstallationFolder]\FMA 2\sframework\plugins, where [FMAInstallationFolder] is the folder where you installed FMA
(I think it is C:\Program Files in the English version of Windows - C:\Programmi in my Italian version)
So the whole path where this script must be copied should be C:\Program Files\FMA 2\sframework\plugins
The script must be saved as AHK.vbs :
Code:
'FMA Script Framework Plugin
'AHK
'Control your PC

'TODO:
'-more

Class AHK
   
   Private llist
   Private m_Self
   
   'Some info about the plugin
   Public Property Get SHOWABLE 'Do I have a menu?
      SHOWABLE    = True
   End Property
   Public Property Get TITLE 'What's my name?
      TITLE       = "AHK"
   End Property
   Public Property Get DESCRIPTION 'What's my purpose?
      DESCRIPTION = "Conotrol your PC!"
   End Property
   Public Property Get AUTHOR 'Who created me?
      AUTHOR      = "kiu"
   End Property
   Public Property Get URL 'Were can I be found? Where can you get more information?
      URL = "http://romeoSA.com/"
   End Property
   
   'Who am I?
   Public Property Let Self (s)
      m_Self = s
   End Property
   Public Property Get Self
      Self = m_Self
   End Property
   
   'Display me. Eventually put a menu on the screen
   Sub Show()
      'Push empty menu to prevent switching pages of the previous menu
      EmptyMenu.ShowMenu
      'No Menu here. Just show information and register keys.
      am.Back = Self & ".Quit" 'Mangage the menu quit by ourselves
      am.DlgMsgBox "Test for now"
      'KeyPad
      KeyManager.RegisterKey   KEY_1,          "Shell.SendKeys ""1""",STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_2,         "Shell.SendKeys ""2""", STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_3,         "Shell.SendKeys ""3""",STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_4,         "Shell.SendKeys ""4""", STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_5,         "Shell.SendKeys ""5""",  STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_6,         "Shell.SendKeys ""6""", STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_7,         "Shell.SendKeys ""7""",STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_8,         "Shell.SendKeys ""8""", STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_9,         "Shell.SendKeys ""9""",STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_0,         "Shell.SendKeys ""0""",STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_ASTERIX,   "Shell.SendKeys ""*""",  STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_SHARP,     "Shell.SendKeys ""c""", STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_JOYLEFT,   "Shell.SendKeys ""l""", STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_JOYUP,     "Shell.SendKeys ""u""", STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_JOYRIGHT,  "Shell.SendKeys ""r""", STATE_RELEASE  , Me
      KeyManager.RegisterKey   KEY_JOYDOWN,   "Shell.SendKeys ""d""", STATE_RELEASE  , Me
   End Sub
   
   Sub Quit
      'Unregister all our key events:
      KeyManager.DeregisterAll Me
      'Remove emtpy menu
      MenuStack.Top.Quit
   End Sub
   
End Class

The result is that the file C:\Program Files\FMA 2\sframework\plugins\AHK.vbs must exist

4)Start FMA

5)Connect it with your phone via Bluetooth (also USB is supported, but...)

6)When connected it will show a menu on your phone and the first item of the menu is AHK

7)Press on AHK

8) if you can't see the menĂ¹ and you connect correctly, in your phone go to:
Connectivity -> Accessories -> FMA -> AHK

9) Start the program kiuBT RemoteControl contained in the pack

10) Navigate between possible layers with *(previous) and #(next)(default in this pack: Notepad and MediaPlayerClassic. Add your owns)

(a layer is a set of command for a specified application)

11) Confirm with 0 (the OSD say you that options for this layer have been setted). To test the application, confirm on Notepad

12)Notepad will start...

13) Press a button and...

14)Let's start control your computer with this simple script

This is the link to the application
kiuBT RemoteControl v0.2beta
if you are interested in the source code, post it here

As always,please send any comments/suggestions/criticism

_________________
____________________
______________________
kiu - www.romeosa.com


Last edited by kiu on March 13th, 2006, 12:26 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 11th, 2006, 7:41 pm 
Offline

Joined: December 18th, 2005, 5:40 pm
Posts: 234
Location: Italy - Galatro(RC)
this is a screenshot of the gui

Image

new in next version:
-enable/disable OSD
-OSD on Monitor 1 or Monitor 2
-open to suggestions

_________________
____________________
______________________
kiu - www.romeosa.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 11th, 2006, 7:48 pm 
@ kiu
I must say it out loud: thanks for your effort - much appreciated :D
Sorry, currently no criticism :wink:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2006, 4:23 am 
Offline

Joined: July 3rd, 2004, 1:03 pm
Posts: 121
Nice. Good job.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2006, 11:51 am 
Offline

Joined: December 18th, 2005, 5:40 pm
Posts: 234
Location: Italy - Galatro(RC)
Thanks for the replies.
If you like it, take a look at this new version:
kiuBT RemoteControl v0.5beta

new in this version (0.5beta):

-install the AHK.vbs file from the main program

-enable/disable OSD (also from phone)

-for the gui: a tooltip, when overing a phone button, show you wich option is currently configured for this button(in version 0.3 you had to look at file to know that information, now the tooltip say it to you)

-option to disable the script from the phone

-option to shutdown the PC from the phone (be carefull with this option)

-various commands to control your mouse

-new built-in mouse layer to control your mouse from the phone

-switch OSD to monitor 1 or monitor 2 (also from phone)

-option to change the volume (up or down)

-now in OSD you can show a name for the command(ex: for MediaPlayerClassic, when you press 5, the OSD show PLAY/PAUSE and not Send,{SPACE})

-fixed a bug when changing layers

-many minor changes

todo:
-enhance mouse capabilities
-open to suggestions

_________________
____________________
______________________
kiu - www.romeosa.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject: k750i support?
PostPosted: March 21st, 2006, 7:36 am 
Offline

Joined: February 16th, 2006, 6:06 pm
Posts: 11
HEY KIU, YOU ROCK BRO!!!

that's pretty amazing, the stuff you can do. however, i tired it with my k750i and though OTHER scripts work, yours seems to be a bit wonky. (as in doesn't work).

do you know why?!?!

Also, i tried your program, but i can't seem to get it to work either (even sending out simple msgbox, hello commands).


weird thing is, k750i works with fma and the other scripts.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 21st, 2006, 8:57 am 
Offline

Joined: December 18th, 2005, 5:40 pm
Posts: 234
Location: Italy - Galatro(RC)
try this:
1)copy AHK.vbs into FMA 2/sframework/plugin
2)open fma
3)connect to your phone
4)select AHK from the menu in your phone
5)open notepad (dont't start my program at this stage)
6)start pressing some buttons on your phone

What do you see?

Mouse plugin works for you?

_________________
____________________
______________________
kiu - www.romeosa.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject: re: bluetooth
PostPosted: June 22nd, 2006, 7:41 am 
Offline

Joined: February 16th, 2006, 6:06 pm
Posts: 11
hey kiu

sorry for the majorley late reply

but i stumbled on this again, recently. and i got the carpediem script working, so i know my phone can connect and all and run scripts all right. i can open my computer files, browse the net, use my phone as a mouse...

however, when i try your script nothing happens. usually, i can connect to the carpediem script from going to my accesories menu. it also pops up automatically anyways. but your script has nothing.

i'm using a SE k750i . if you have time, please tel lme what to do!! thanks


oh yeah, i saw your site, and mbook app. but it's all in italian?!? is there any english version?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2006, 11:21 am 
Offline

Joined: December 18th, 2005, 5:40 pm
Posts: 234
Location: Italy - Galatro(RC)
you must use sframework(default) as main script, and not carpediem
tell me if you will solve the problem

_________________
____________________
______________________
kiu - www.romeosa.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 29th, 2006, 8:03 am 
Offline

Joined: February 16th, 2006, 6:06 pm
Posts: 11
hey kiu,

i found that even when i "update" to the newest version, it does not update the scripts. so i manulaly downloaded the new one, and now my scripts work (kinda)

at least, i see a menu. and if i go into the "scripts disabler" i can clikc and unclikc AHK, but AHK DOES NOT appear in the main menu for some strange reason.

thanks!

jon


Report this post
Top
 Profile  
Reply with quote  
 Post subject: can't find menu
PostPosted: April 8th, 2008, 4:28 pm 
jon_chew wrote:
hey kiu,

i Can't see the menu and he said ther are no Accessories connectet


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: nomissenrojb, Rajat and 56 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group