Messages - autohost [ switch to compact view ]

Pages: [1] 2 3next
1
I'm still using Powermarks, BrainWave Generator, Jaangle (portable), WinChime, HotBasic, JauntePE, Space Empires III (v 1.17, november 1998), Jasc Image Robot, MangaMeeya, Jasc Paint Shop Pro 7, Bekky Mail, Bit Che, Acid View, BiromSoft Calc, NotPad, PolyEdit, TextPad 4, 3D Color Changer, CatFood Fortune Cookies, AXE 3.4, Jazz UPX, Naevius Directory Watcher and WinSpy 1.7.
Oh!  I see several here I loved!  WinChime and Paint Shop Pro 7.

I'll add another plug for WordStar.  I used it on my dad's Kaypro II in the mid 80's.

A newer one (early 90's) that I liked was 386Max!  A DOS program, it allowed the user to load memory-resident programs and drivers in the unused memory space between the 640k and 1meg area, so that more of the 640k space was available to regular DOS programs.  It also allowed easy configuration of the memory above the 1meg mark to allow programs to use Extended and/or Expanded memory.


3
Post New Requests Here / Re: IDEA: See if a user is logged in
« on: April 21, 2009, 03:15 PM »
Looks like its VERY easy as an AHK script, sorry to insult everyone's intelligence by asking for so simple an app  8)

#NoTrayIcon
#SingleInstance ignore
#MaxMem 1
#NoEnv

; This script reports this computer as logged out

UrlDownloadToFile, http://univeristy.edu/map/report.php?station=%A_ComputerName%&status=no&pw=password,%A_MyDocuments%status


Something like the above.


Ok, it was pretty simple and fun.  Here is the completed app.  Maybe it will be useful to someone.

Here's the background for the code below:
Our library has 3 sets of patron computers named:
LIB-PATRON-1 through LIB-PATRON-16
LIB-PATRON-P1 through LIB-PATRON-P10
LIB-PATRON-U1 through LIB-PATRON-U24

The AHK script below pings the 6 closest stations and reports their status to a PHP program I wrote.  Compiled into an exe file and put into the domain login script.
I took the data reported and created a PHP page that displays the current status of all our patron stations.

#NoTrayIcon
#SingleInstance ignore
#MaxMem 1
#NoEnv

; Written in AutoHotKey by Ron Miller, Apr. 21, 2009

; This script reports this computer as logged in
; it also checks the 6 computers immediately around it and reports if they are up or down.


; %A_ComputerName% contains computer name in all caps
station := A_ComputerName

IfInString, A_UserName, lpac
{
        ; guest user, no password
user := "lpac"
}
else {
user := "university_user"
}

SubPat := ""
if (RegExMatch(station,"LIB-PATRON-(\d+)", SubPat))
{
Max := 16

; The Goto's you see in the following several IF statements prevent clobbering of SubPat1
Goto, Here
}

if (RegExMatch(station,"LIB-PATRON-(P\d+)", SubPat))
{
Max := 10
Goto, Here
}

if (RegExMatch(station,"LIB-PATRON-(U\d+)", SubPat))
{
Max := 24
Goto, Here
}

Here:

Work(Max,SubPat1)

Down_S := ""
if (d_count > 0)
{
Loop, %d_count%
{
Down_S .= Down_A%A_Index% . ":"
}
}
;else
;{
; MsgBox All stations are responding
;}

if (u_count > 0)
{
Loop, %u_count%
{
Up_S .= Up_A%A_Index% . ":"
}
}

UrlDownloadToFile, http://libraryurl/patronstation/report.php?station=%station%&status=yes&user=%user%&down=%Down_S%&up=%Up_S%&pw=reportpassword,%A_MyDocuments%status


Ping(NWA)
{
; MsgBox Pinging %NWA%
RunWait %ComSpec% /C ping -n 1 -w 250 %NWA%,,Hide
If (ErrorLevel)
{
Return 0
}

Return 1
}


Work(Max,SubPat)
{
; Have to set the following global so they can be read outside this function
global Down_A, Down_A1, Down_A2, Down_A3, Down_A4, Down_A5, Down_A6, d_count, Up_A,Up_A1,Up_A2,Up_A3,Up_A4,Up_A5,Up_A6,u_count

extra := "", temp := SubPat

; handle the U series of patron stations
if (InStr(SubPat,"U"))
{
extra := "U"
RegExMatch(SubPat,"U(\d+)",part)
Goto, Here1
}
; handle the P series of patron names
if (InStr(SubPat,"P"))
{
extra := "P"
RegExMatch(SubPat,"P(\d+)",part)
}

Here1:

; Ping 6 stations total, 3 below the current one, and 3 above
Sub := 3, Add := 3


if (extra != "")
{
temp := part1
}

part := temp

; Constrain loop to the number of stations we want to ping
Loop, 6
{
if (part - Sub < 1)
{
Sub--, Add++
}

if (part + Add > Max)
{
Add--, Sub++
}

if ((part - Sub >= 1) && (part + Add <= Max))
{
break
}
}

d_count :=0, u_count :=0

; loop through station names below current one
Loop, %Sub%
{
NWA := "LIB-PATRON-" . extra . (part - Sub)
if (Ping(NWA))
{
u_count++
Up_A%u_count% := NWA
}
else {
d_count++
Down_A%d_count% := NWA
}
Sub--
}

; loop through station names above current one
Loop, %Add%
{
NWA := "LIB-PATRON-" . extra . (part + Add)
if (Ping(NWA))
{
u_count++
Up_A%u_count% := NWA
}
else
{
d_count++
Down_A%d_count% := NWA
}
Add--
}

}

4
Post New Requests Here / Re: IDEA: See if a user is logged in
« on: April 14, 2009, 02:32 PM »
Looks like its VERY easy as an AHK script, sorry to insult everyone's intelligence by asking for so simple an app  8)

#NoTrayIcon
#SingleInstance ignore
#MaxMem 1
#NoEnv

; This script reports this computer as logged out

UrlDownloadToFile, http://univeristy.edu/map/report.php?station=%A_ComputerName%&status=no&pw=password,%A_MyDocuments%status


Something like the above.

5
Post New Requests Here / Re: IDEA: See if a user is logged in
« on: April 14, 2009, 11:27 AM »
Ouch!  Sorry, just slapped myself in the head for not seeing that one when I wrote the post.

You're absolutely right, that would be an easier way to do it -- have the app report its own status to a webpage.

Pages: [1] 2 3next
Go to full version