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 08, 2016, 02:05:25 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: Help with autohotkey coding =(  (Read 5207 times)

maria-

  • Participant
  • Joined in 2009
  • *
  • Posts: 6
    • View Profile
    • Donate to Member
Help with autohotkey coding =(
« on: June 22, 2009, 12:13:41 PM »
hey everyone

I am new in Autohotkey coding. so all i want is, a sound alert and notice in taskbar whenever power cable is plugged off a laptop.

any help anyone?  :)

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,367
    • View Profile
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #1 on: June 22, 2009, 12:23:15 PM »
You could start with BatteryRun from Skrommel

Quote
BatteryRun v1.1
Run commands when the power chord is connected or disconnected

Command line:
  BatteryRun.exe "<connect command>" "<disconnect command>"
Example:
  BatteryRun.exe "ding.wav" "calc.exe"

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #2 on: June 22, 2009, 12:33:09 PM »
this is how good skrommel has gotten.. now he writes coding snacks before they are even requested  :o

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #3 on: June 25, 2009, 08:15:05 PM »
this is how good skrommel has gotten.. now he writes coding snacks before they are even requested  :o

And Vista Superfetch loads 'em before you even knew you had 'em. ;)

maria-

  • Participant
  • Joined in 2009
  • *
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #4 on: July 05, 2009, 02:49:28 AM »
hiya mates,

I reallly badly need help with this autohotkey coding :(  please someone come up wid any idea.


Sound alert when power cable or network cable is plugged or unplagged

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #5 on: July 05, 2009, 11:55:47 AM »
Search here and chances are you'll find it:

http://www.autohotke....com/forum/index.php

maria-

  • Participant
  • Joined in 2009
  • *
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #6 on: July 05, 2009, 12:41:34 PM »
Thanks. Already sought for a solution dere ;(  nothingz workin yet  :-\

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,367
    • View Profile
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #7 on: July 05, 2009, 02:51:28 PM »
Thanks. Already sought for a solution dere ;(  nothingz workin yet  :-\
I suggest you go to this page of software by Skrommel (click on this link).
Find "BatteryRun" and download the version to the left of the 'H' symbol (as indicated in the image) you will find code to do what you want if you make very minor modifications.

This is the item you want This.png

maria-

  • Participant
  • Joined in 2009
  • *
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #8 on: July 05, 2009, 05:35:48 PM »
thanks for ur help. i already tried dat one and dint work ;(

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #9 on: July 05, 2009, 05:40:15 PM »
thanks for ur help. i already tried dat one and dint work ;(

You might try AutoIt3.

Unless you're dead set on AHK.  Some things in AHK are way easier, but some stuff, like string handling that's easy in just about every other language, gets me ripping my hair out.  Just a thought. :)

http://www.autoitscr...com/forum/index.php?


maria-

  • Participant
  • Joined in 2009
  • *
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #10 on: July 05, 2009, 05:51:44 PM »
yea you are right. but i must do it in ahk ;(   

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #11 on: July 05, 2009, 07:20:18 PM »
yea you are right. but i must do it in ahk ;(   

I know the feeling.  I think if I could just get them to always double quote strings that would eliminate half the helpfile browsing.  It does have better mouse "hotkey" support than AutoIt.  But a major thing I like about AutoIt3 is it's more "modular" or at least it's easier to create encapsulated function libraries.

So to break the problem down, you mention the power being unplugged, sound, and a Tooltip(or something similar.)  Are all 3 in need of implementation or just the alerts to the user?

maria-

  • Participant
  • Joined in 2009
  • *
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #12 on: July 06, 2009, 12:11:09 AM »
yea, jus a sound alert whenver power cable or network cable is unplugged. any idea?

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Help with autohotkey coding =(
« Reply #13 on: July 06, 2009, 11:26:36 AM »
You can use Play to play a .wav file.  afa detecting the power I don't have a notebook or laptop to try it.  For the popup look up ToolTip in the help.