Sign in to follow this  
Followers 0
Jammer

Non user execution problems.

2 posts in this topic

Sleep(10000)
$number = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO")
$line = FileReadLine("data.dat",$number)
if @error = -1 Then 
$number = 1
$line = FileReadLine("data.dat",$number)
EndIf
TrayTip("Dar vienas budas pasakyti kad myli...",$line,5)
Sleep(5000)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO", "REG_SZ",$number+1)

so i have words i love you in 180 different languages stored in data.dat.

When this file is run after 10 seconds it should show a traytip with the words. and show different words every time.

everything works fine when you(the user) run the file but if the file is run by registry startup the traytip does not appear for some reason. i even made a launcher program which is ran by startup. the launcher program is started by registry startup then it waits 120 seconds and does Run("I-Love-You.exe") ... the i love you icon on the tray appears but still it does not show the traytip for some reason. Help?

Share this post


Link to post
Share on other sites



Sleep(10000)
$number = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO")
$line = FileReadLine("data.dat",$number)
if @error = -1 Then 
$number = 1
$line = FileReadLine("data.dat",$number)
EndIf
TrayTip("Dar vienas budas pasakyti kad myli...",$line,5)
Sleep(5000)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO", "REG_SZ",$number+1)

so i have words i love you in 180 different languages stored in data.dat.

When this file is run after 10 seconds it should show a traytip with the words. and show different words every time.

everything works fine when you(the user) run the file but if the file is run by registry startup the traytip does not appear for some reason. i even made a launcher program which is ran by startup. the launcher program is started by registry startup then it waits 120 seconds and does Run("I-Love-You.exe") ... the i love you icon on the tray appears but still it does not show the traytip for some reason. Help?

Seems that this code only reads a line and traytips it ONCE, then exits. This is what you intended?

Note that when a tray icon disappears, the traytip also disappears. Also note that the TrayTip help states that Windows has roughly lower-upper limits of 10-30 sec. for showing traytips.

To go short, what if you do this:

Sleep(10000)
$number = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO")
$line = FileReadLine("data.dat",$number)
if @error = -1 Then 
$number = 1
$line = FileReadLine("data.dat",$number)
EndIf
TrayTip("Dar vienas budas pasakyti kad myli...",$line,15); *** INCREASED DURATION ***
Sleep(15000); *** INCREASED DURATION ***
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\I-Love-You\", "NO", "REG_SZ",$number+1)

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0