Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to trigger 'task scheduler' on new wifi connection?


22 Sep 2012   #1

Windows 7 Ultimate x64
 
 
How to trigger 'task scheduler' on new wifi connection?

Hey everyone,

Searched everywhere, and really striking out on how to do this (if it's even possible). I'd like to use Task Scheduler (or some other program) to automatically perform a task when my Android phone connects to my home wifi network (my PC is plugged into this router). Is there a way to use my Linksys router to trigger an event on my PC, that I can use to perform an action? Really just need it to do basic things, like start playing music on my computer by opening Spotify. Not sure if this is possible...

Thanks in advance for the advice!


My System SpecsSystem Spec
.

22 Sep 2012   #2

W7 Pro SP1 64bit
 
 

Welcome to the Seven Forums.

One way to do this is to:
...have the Linksys router always assign the same IP address to your phone
...write/run a script* on your Windows computer that pings that IP
...once the IP responds then the phone is connected to that network
...the script can then launch or do whatever you can code it to do


*use s scripting tool like AutoIt or AutoHotkey
My System SpecsSystem Spec
22 Sep 2012   #3

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by UsernameIssues View Post
Welcome to the Seven Forums.

One way to do this is to:
...have the Linksys router always assign the same IP address to your phone
...write/run a script* on your Windows computer that pings that IP
...once the IP responds then the phone is connected to that network
...the script can then launch or do whatever you can code it to do


*use s scripting tool like AutoIt or AutoHotkey
Thanks for the quick response. Looks like this task may be a little advanced for me (hardly any script writing experience...). I might have to keep searching for now.
My System SpecsSystem Spec
.


22 Sep 2012   #4

W7 Pro SP1 64bit
 
 

Can you set your router to assign the same IP address to the phone?
This is usually done via the mac address.

Here is some AutoIt code that you can modify:
Code:
AutoItSetOption ("TrayIconDebug", 1)

While 1
    If Ping("192.168.0.10", 10000) Then _Do_this()
    Sleep(1000)
WEnd

Func _Do_this()
    Run("notepad")
    While 1
        If Not Ping("192.168.0.1", 10000) Then Return
        Sleep(10000)
    WEnd
EndFunc
The first While/Wend loop waits for the phone to appear on the network.
Once the phone shows up - the code goes to the function named _Do_this
For this test code - I just have it open notepad.
The next While/Wend loop waits for the phone to leave the network.
Once the phone leaves - the code starts all over again at the first loop.

Watch the second video in this post...
http://www.sevenforums.com/general-d...ml#post1841812
...and read the info about AutoIt.

Give it a try - post back if you cannot get it to work.
My System SpecsSystem Spec
Reply

 How to trigger 'task scheduler' on new wifi connection?




Thread Tools



Similar help and support threads for2: How to trigger 'task scheduler' on new wifi connection?
Thread Forum
Task Scheduler recognizes only first trigger Performance & Maintenance
Solved Task scheduler: trigger on screensaver event possible? Performance & Maintenance
Function of time field in New Trigger window Task Scheduler? Customization
Scheduler/trigger events General Discussion
Help with using idle trigger in Win Task Scheduler Performance & Maintenance
How to Configure Task Scheduler to Run Program When Dial-up Connection Performance & Maintenance
Task Scheduler Trigger @ Program shutdown Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:41 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33