ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Turn a batch file into an AHK script.

<< < (7/16) > >>

pilgrim:
4wd,

I've come back to this due to interest from elsewhere.

I am as happy as it is possible to be with creating batch files to run PPTPchek but I know a lot of people who would not be (able to).
Is there any way that it could be made non-specific, i.e. so that it would run when any PPTP/L2TP VPN is connected and thereby do away with the need for batch files?

As I said this not for me but I said I would ask you in case you felt like looking into it at some time.

4wd:
Yes, I could just change it so it ran all the time if no arguments were passed.

In that case, with its current method of working, I'd probably have the default interval changed to 10-15 seconds.

EDIT: Or in Win7, there's probably an EventID when a connection is made that you could use to trigger a Scheduled Task.

Here we go, this should work for Vista and later, (including WHS2008+) - requires latest PPTPchek.exe (0.3.0.16):

1) Run Task Scheduler and select Create Basic Task

Turn a batch file into an AHK script.

2) Give your task a name, (and a description if you want), then hit Next:

Turn a batch file into an AHK script.

3) Select When a specific event is logged then hit Next:

Turn a batch file into an AHK script.

4) Set up the Trigger as below and hit Next:

Turn a batch file into an AHK script.

5) Choose Start a program, hit Next:

Turn a batch file into an AHK script.

6) Fill out the fields with the appropriate info, hit Next:

Turn a batch file into an AHK script.

7) Hit Finish

Turn a batch file into an AHK script.

Job done!  Program will run when a PPTP connection is made.

(And no, the Task Scheduler in XP isn't intelligent enough to do this.  :) )

pilgrim:
Like using batch files, I could work that out but most of the people I am thinking of would have no more idea of how to create a scheduled task than they would of how to create a batch file.

Remember that I am lost when it comes to programming so what I am about to say may not be possible.

Network Activity Indicator works for the main network connection(s?) from my point of view it would have been nice if the icon was only visible when a connection was active (but that's just me).
I was thinking in terms of something that worked the same way but only for PPTP/L2TP.

(And no, the Task Scheduler in XP isn't intelligent enough to do this.  :) )
--- End quote ---

XP already has automatically appearing icons built in.

Sudden thought! How are the icons triggered in XP? Is it possible to translate that to 7?

pilgrim:
As I have had other things to do I am still using the shortcuts/batch files I set up with the previous version of PPTPchek.
I have been swapping between protocols and VPN's for the last couple of hours checking various things unrelated to this thread and I have made a discovery.
If I start a PPTP VPN from a shortcut/batch file that includes PPTPchek the connection is made and the icon appears.
If the connection then drops the icon disappears, the connection is set to automatically reconnect which is what it is doing but the icon does not reappear.
I have tried it with both the previous and latest versions of PPTPchek although I have not yet had time to try it as a scheduled task which might solve the problem.
I suppose this should have been obvious because it is the batch file that is the trigger not the connection itself.  :-\

I can't read the print in your images even with a magnifier (blurred) , I think I can work most of it out except for what is in the second and third boxes in step 4?

4wd:
I can't read the print in your images even with a magnifier (blurred) , I think I can work most of it out except for what is in the second and third boxes in step 4?-pilgrim (May 08, 2013, 11:17 AM)
--- End quote ---

Click on the images, they're much bigger than they appear. :)

Or just use PPTPchek.exe 600 in your batch file.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version