Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 06, 2016, 11:57:38 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: A question, maybe you guys can help me...  (Read 4024 times)

TheGiant

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 7
    • View Profile
    • Giant's Randoimness
    • Donate to Member
A question, maybe you guys can help me...
« on: December 09, 2005, 10:18:48 PM »
Is there a way, say I can run something in the background, that can run programs or scripts, such as autohotkey scripts automatically say when it detects a device connected. Like when I connect my iPod, I can run things in order like iTunes, or whatever instead of just iTunes when I connect it. I can automate the programs with like AutoHotKey scripts, but I don't know how to detect when my iPod is connected.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: A question, maybe you guys can help me...
« Reply #1 on: December 09, 2005, 10:24:06 PM »
this might be a good idea for a coding snack - if no one knows an existing program i'll move it over there if no one knows an existing program.

a question that might help to figure this out -
does anything "happen" already when the device connects?
ie a new icon in tray, a messagebox that is displayed, a change in the drive list in explorer.. i.e. anything that a program watching could look for and trigger on..

jazper

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 92
    • View Profile
    • Jazper's Software
    • Donate to Member
Re: A question, maybe you guys can help me...
« Reply #2 on: December 09, 2005, 11:53:33 PM »
Most likely WM_DEVICECHANGE would be of assistance in this situation....


j.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,136
    • View Profile
    • Donate to Member
Re: running stuff when connecting the iPod to the PC
« Reply #3 on: December 10, 2005, 04:34:04 AM »
Is there a way, say I can run something in the background, that can run programs or scripts, such as autohotkey scripts automatically say when it detects a device connected. Like when I connect my iPod, I can run things in order like iTunes, or whatever instead of just iTunes when I connect it. I can automate the programs with like AutoHotKey scripts, but I don't know how to detect when my iPod is connected.
Such rather vague questions are better to be asked in the forum on http://www.autohotkey.com/ where there are LOTS of AHK experts - here are still only a few. How long have you been using AutoHotkey now? It's great, huh? :)

jpfx

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 154
    • View Profile
    • Donate to Member
Re: A question, maybe you guys can help me...
« Reply #4 on: December 10, 2005, 07:49:52 AM »
I think the OP is open to programs 'such as' authohotkey so here's a good place, though I have no recommendations myself, vague or otherwise.
       |\      _,,,---,,_         
ZZZzzz /,`.-'`'    -.  ;-;;, 
      |,4-  ) )-,_. ,\ (  `'-'    
     '---''(_/--'  `-'\_)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: A question, maybe you guys can help me...
« Reply #5 on: December 10, 2005, 08:25:22 AM »
i'm moving this to coding snacks - i'm guessing based on jazper's suggestion about wm_devicechange, that this may indeed be a simple coding snack.

i'm thinking a tray based program, with a simple list of rules saying, when this wm_devicechange message comes in, launch these apps.
and a nice wm_devicechange "spy" window that lets you see a list of received wm_devicechange messages seen so far so you can find the one corresponding to your device.

the program should also check if the app to launch is already running, and do nothing if so.
« Last Edit: December 10, 2005, 08:31:24 AM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: A question, maybe you guys can help me...
« Reply #6 on: December 10, 2005, 08:36:42 AM »
for the intrepid coding snack author, it might be nice to make this a more generic tool that could catch a range of windows messages besides just wm_devicechange, and launch programs based on receiving certain ones.

TheGiant

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 7
    • View Profile
    • Giant's Randoimness
    • Donate to Member
Re: A question, maybe you guys can help me...
« Reply #7 on: December 10, 2005, 11:31:42 AM »
Sweet thanks, I wanted to add, that when I connect the iPod, it appears as a drive letter in Explorer, that's because I set iTunes to allow me to do that, and also have set it not to launch when I plug it in, so on occasion I can use XPlay to access it as well but never both at the same time. 

I figured it might be a coding snack idea but I wasn't sure. I know for the Mac there's a script that can run whatever when the iPod is connected instead of just one or another program, that's kind of what I was looking for. So I could sort of automate iTunes and PodPlus or whatever in a certain order so one doesn't mess with the other, and so I can sync the thing without really having to click too many buttons, because sometimes I am in a hurry to get out the door.

TheGiant

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 7
    • View Profile
    • Giant's Randoimness
    • Donate to Member
Re: A question, maybe you guys can help me...
« Reply #8 on: December 10, 2005, 12:01:17 PM »
Another thing I thought of though, is that since my iPod acts as a drive. It still has to be manually ejected...Maybe an option to eject it if that was also possible. I dunno, now my head is filling with too many ideas, if that's too much for whoever codes it, then don't worry about it. :)  Maybe I can just do that in an AHK script or something, some things might have to be run that way to automate them anyway.