topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday April 26, 2024, 7:09 pm
  • Proudly celebrating 15+ 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pilgrim [ switch to compact view ]

Pages: prev1 ... 3 4 5 6 7 [8] 9 10 11 12 13next
176
Post New Requests Here / Re: Turn a batch file into an AHK script.
« on: April 29, 2013, 08:19 AM »
The idea is to trigger something with a hotkey that will enable the VPN and put an icon in the system tray.
Trigger it a second time from the same hotkey and it will disable the VPN and remove the icon.

It would be useful if the icon only appeared once the connection is established but that is not essential as all my connections are set to reconnect if they drop out anyway.

The reason I was looking at an executable was to give me a choice of icons but I would need the script for it as I use numerous VPN's and they all require their own batch files so the script would be different for each one.

177
General Software Discussion / KeyScrambler and OSK's.
« on: April 29, 2013, 07:45 AM »
I am posting this in the hope of furthering my knowledge of the mysteries of computers.

I use KeyScrambler and since I first installed it a few years ago I have largely ignored it as apart from the icon changing colour according to which program I am using it never makes its presence felt.
I did discover that global spell checkers will not work with it enabled while those in individual programs will.

In my efforts in recent months to make my computer easier to use I have been playing around with an OSK, as the built-in one is not to my liking I downloaded AHKOSK although my comments apply to both.
When I started using it I was triggering hotkeys to save keep moving my hand between the keyboard and the mouse, these worked perfectly.
A few days ago I needed to enter 2 words into a file, as I had the OSK running I used that only to find it produced gibberish. I realised straight away that it was because of KeyScrambler, something I confirmed by disabling it.

What I would like to know is, if keys on the OSK are encrypted when typing how do hotkey commands get through unencrypted?
I am not looking for a description of how KeyScrambler works but why there are two outcomes from the same keys depending on what they are being used for.

178
Post New Requests Here / Turn a batch file into an AHK script.
« on: April 29, 2013, 07:16 AM »
Ever since I started using Windows 7 one of my dislikes was that there was no way to show an icon in the system tray to tell if a PPTP/L2TP VPN was connected, unlike in XP.
Having sorted out most of the other things I wanted to change I have come back to the issue and think that I have found a solution but I need some help to finalise it.

I have written a batch file that enables me to toggle individual PPTP VPN's on and off but that still leaves me without an icon.
My idea is to create an AHK script to do the same job, as far as I can see it is not possible to change the icon on an AHK script which leads me to the possibility of converting it to an EXE.

The batch file:

if exist pptp-running.txt goto running
rem prog is not running
copy NUL>pptp-running.txt
start /D "C:\Batch Files\PPTP ON-OFF" PPTP-US-ON.bat
goto alldone
:running
rem prog is already running
del pptp-running.txt
start /D "C:\Batch Files\PPTP ON-OFF" PPTP-OFF.bat
:alldone

Can this be converted to an AHK script and if compiled will it still toggle on alternate triggers?
If not can anybody suggest an alternative?

179
I replaced Softmaker Office 2008 with FreeOffice on my Netbook yesterday and found that I cannot open the help file from within the program.
The window opens for it but it's empty, if I click on the X to close it the entire program closes.
If I go to the installation folder and double click on the chm file it opens as it should although it is not showing images, just boxes with a red cross.
I re-registered the ocx and tried the repair option in the installer, neither made any difference.

180
General Software Discussion / Re: Combining Batch Files
« on: April 28, 2013, 09:12 AM »
Ath,

Thanks for that, I've spent a lot of time on that site recently, along with Computer Hope it's where I've found the most information.

x16wda,

I've been over everything and solved all the problems except for one which I'll get to in a minute.
I can toggle between 2 batch files with the following:

if exist prog-running.txt goto running
rem prog is not running
copy NUL>prog-running.txt
start /D "C:\Batch Files\AHKOSK ON-OFF" AHKOSK_ON.bat
goto alldone
:running
rem prog is already running
del prog-running.txt
start /D "C:\Batch Files\AHKOSK ON-OFF" AHKOSK_OFF.bat
:alldone

I ran your script from reply 4, on XP it runs as is, on 7 I had to modify it.
Besides the differences in NIC details I cannot get the "" setting to run on 7, I  have to change it to /D, then it runs perfectly.
If I use "" I either get an error message or it opens an Explorer window to the relevant folder.
So the file on 7 reads thus:

rem Check if our flag file exists and act accordingly
if exist internet_is_on.txt goto running

rem Turning Internet items ON
echo hah>internet_is_on.txt

start /D "C:\Program Files (x86)\D4" D4.exe
start /D "C:\Program Files (x86)\Sandboxie" SbieCtrl.exe
start /D "C:\Program Files (x86)\PeerBlock" peerblock.exe

netsh interface set interface "Router Connection" ENABLED

goto alldone

:running
rem Internet is ON, turn it all OFF now
del internet_is_on.txt

taskkill /F /IM peerblock.exe
taskkill /F /IM SbieCtrl.exe
taskkill /F /IM D4.exe

netsh interface set interface "Router Connection" DISABLED

:alldone

The problem is that just like my original Internet ON-OFF files it leaves the icons in the system tray after the programs shut down on both OS'.
But, I have two files which toggle a single program:

@echo off

taskkill /f /im ahk_osk.exe || start /D "C:\Program Files\AHKOSK" ahk_osk.exe

This leaves the icon in place.

@echo off

tasklist /fi "ImageName eq ahk_osk.exe" | find /i "ahk_osk.exe" && taskkill /fi "ImageName eq ahk_osk.exe" || start /D "C:\Program Files\AHKOSK" ahk_osk.exe

This removes the icon.

My question is whether it is possible to incorporate something from this second file, or anything else for that matter, into your script from reply 4 so that it will automatically remove the icons when the programs are closed?

181
General Software Discussion / Re: Combining Batch Files
« on: April 27, 2013, 09:42 AM »
x16wda,

I have not had the time to look at things again but I caught your post and decided to quickly reply to it .

My idea is to keep things as simple as possible (for me).

In case you never caught it comment 9 in the second link is for Windows 7, comment 13 is for XP.
My thought is to create one batch file that will trigger the other two on either OS'.
For one thing that will save messing about with the batch files I already have which are working.
As I said, when I tried to combine the ON and OFF files only parts of them worked.

What I have in mind is something along these lines:

IF SBiectrl.exe is running start Internet_OFF.bat
ELSE start Internet_ON.bat

Obviously that is not exactly how it would look but it's where I'm starting from.

If I did not get anywhere with that another idea was to try and create a toggle so that each time I pressed the same hotkey it alternated between the two files, same outcome different perspective.
If that failed as well I was going to look at using AHK although I would prefer not to in this case.

Let me see what I can come up with before you suggest anything definite or do it for me.

When I've had another go I'll post the results either way.

182
General Software Discussion / Re: Combining Batch Files
« on: April 27, 2013, 05:50 AM »
Thank you both for your replies.

I'm afraid that mention of flags means nothing to me unless they are fluttering from flagpoles, I have always been a practical person and any sort of programming language loses me quite early on.
I have bookmarks and text files containing all the information I could need on both batch files and AHK, to do just about anything they are capable of doing, but putting it together is something else.
I keep being reminded of when I started using logic gates in electronics, at least then I could get diagrams of the IC's to see what each pin was for.

With regard to my original post, after many hours of searching online I found THIS (comment 1) which solved the initial problem.

I have now moved on to trying to find ways to combine the 2 batch files in comment 9 of THIS thread, which will also give me the answer to combining the 2 batch files in comment 13 of the same thread.
My efforts so far seem to indicate that I actually need to create a third batch file in each case using IF and ELSE commands to trigger the other 2, when I tried to combine them I found that only 2 of the 3 programs were being triggered and it had no effect at all on the connection.
By the time I had got that far I needed to pack up, I'll start again when I have the time.

183
General Software Discussion / Combining Batch Files
« on: April 25, 2013, 11:52 AM »
I have two very simple batch files to start and stop a single program. The first uses the 'start' command, the second the 'taskkill' command.
Is there a way to combine the two to create a toggle?
I have tried numerous options but they all finish up starting the program and then stopping it.

184
Now you've got me wondering?

It was some time ago now but I remember I had issues with format not being retained.

I'll give FreeOffice a try in place of 2008 and if it will do what I want I'll consider putting it on the PC as well.

Not that it's an issue but including all the extras the Word installation is around 250 MB in total.

185
Debian,

Yes I found that a couple of days ago after reading this thread.

I gave up on Open Office around the time it moved to Oracle.

I have Softmaker Office 2008 on my Netbook and I might replace it with FreeOffice.

On my new computer I installed a copy of Word 2002 because I still have a lot of .odt files.

186
As of 2 minutes ago Softmaker Office 2008 was still available HERE.
Links for download and registration both working.

187
Living Room / Re: Do not read this.
« on: April 25, 2013, 05:06 AM »
I blame it on that Maharishi bloke and his 'Tangentdental Meditation'.
What's your excuse? :D

188
Living Room / Re: Do not read this.
« on: April 24, 2013, 09:12 AM »
I did watch the video, which is how I got to the Romans, and your association.
My association was the beginning of verse 2, every time I think of Romans I remember it.

I knew I shouldn't have got up this morning. :)

189
Living Room / Re: Do not read this.
« on: April 24, 2013, 04:41 AM »
Association of ideas:
Video - Romans
Romans - ???

190
@pilgrim/T-man - um...I think you made a lot more work for yourselves than you needed to.

Microsoft has tools available to deal with NET Framework installation problems.

It's a pity that none of them worked!

I tried everything else I could think of over the years

I have had all 3 of those tools for a long time, plus the Windows Install Clean Up Utility, I also have all the redistributables from v1 to v4.
My comment which I have quoted again above can, I assure you, be taken literally.

I also came across, what is for me, a .net first the other day, I downloaded a program I wanted to have a look at and when I went to run it I was informed that it required .net 4.5!
Oh joy, there's another one.

191
Tinman,

I never had direct dealings with MS but I tried everything else I could think of over the years including completely uninstalling then reinstalling the whole .net framework, twice!

When I finally sorted it out recently I made a list of all the .net updates that I had hidden and searched online for each one using the KB numbers, as I said it took a long time but I finally tracked down solutions to all of them, much to my surprise.

192
General Software Discussion / Re: Aero effects without Aero
« on: April 20, 2013, 04:54 AM »
My first and last program.



Pilgrim.
AHK (retired)

193
General Software Discussion / Re: Aero effects without Aero
« on: April 18, 2013, 11:05 AM »
Is it possible to use both Alt and Alt Gr to trigger the same command in AHK without duplicating the whole command? :tellme:

194
Living Room / Re: Do not read this.
« on: April 18, 2013, 04:57 AM »
I love these intellectual threads. :read:

195
Living Room / Re: When you make your 100'th Post
« on: April 18, 2013, 03:31 AM »
@pilgrim
I wouldnt have been so sure oblivion was English
-
was it the combination of him being so articulate and then saying "non-american" that gave it away?
or
was it the use of "<sniff>" :D

It's a gift I inherited from my mother sir.
(Tugs forelock and exits stage right.)

196
Living Room / Re: When you make your 100'th Post
« on: April 17, 2013, 11:12 AM »
(And modest too.) :D

My modesty, as you have clearly indicated, is just one of my fine attributes.


Spoken like a true gentleman.

Yay for Non American accents. So which accent is it?   :)
It is English. The one that I think sounds completely normal and Americans think sounds either old-fashioned and quaint, or like a criminal mastermind. ;)


Half of those I met thought I was Australian!

Cor blimey mate, you mean you can't tell?
I am NOT Dick Van Dyke. There's more to English accents than cartoon cockneys, y'know... ;)


Not all of us made it into cartoons. ;D

197
Living Room / Re: When you make your 100'th Post
« on: April 17, 2013, 10:48 AM »
Yay for Non American accents. So which accent is it?   :)

Cor blimey mate, you mean you can't tell?

198
Living Room / Re: When you make your 100'th Post
« on: April 17, 2013, 10:36 AM »
I just discovered I never noticed my 100th.<sniff>

Still, just to commemorate the fact that I must have written a hundredth post at some point (and, of course, it must have been perfectly crafted, beautifully enunciated and carefully delivered in a non-American accent) I've just updated my avatar.

You mean you was 'oblivious' to it?

(And modest too.) :D

199
Sorry, it was my way of questioning the part that I quoted. :-[

200
hehe, the giveaway has some reg info to register the soft... you didn't know? Is this giveaway legit? :P

You misunderstood my reply.

Yes the giveaway is legit, Glarysoft have been offering daily giveaways since 5th November last year.

A lot of giveaways have restrictions about installation or re-installation that 'ain't necessarily so'.
I'm not talking about hacking or anything like that but simply looking at what you actually get in the 'giveaway' download and considering possible options.

Pages: prev1 ... 3 4 5 6 7 [8] 9 10 11 12 13next