Sign in to follow this  
Followers 0
anystupidassname

can i do this?

6 posts in this topic

I'm using multiple traytips as part of the script and I'd like to let a cmdline decide if Opt("TrayIconHide", 1) is implented or not so the user can run with a /parameter to silence traytips but it isn't working. The script just fails if Opt("TrayIconHide", 1) is set no matter what... I take it this is "as designed"?


This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

Share this post


Link to post
Share on other sites



This script works without any visible error:

opt("trayIconHide", 1)
msgBox(64, "Test", "About to attempt a trayTip()")
trayTip("Testing...", "123...", 5, 16)
sleep(5000)

Share this post


Link to post
Share on other sites

I don't get a TrayTip because the tray icon is hidden, but I don't get an error box popping up which is what I implied by your first post. Is this right?

Share this post


Link to post
Share on other sites

I don't get a TrayTip because the tray icon is hidden, but I don't get an error box popping up which is what I implied by your first post. Is this right?

<{POST_SNAPBACK}>

Not sure what I was thinking. I rewrote and so far so good. Thanks.

This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

Share this post


Link to post
Share on other sites

I don't get a TrayTip because the tray icon is hidden, but I don't get an error box popping up which is what I implied by your first post. Is this right?

<{POST_SNAPBACK}>

Can you have an Opt / AutoItSetOption in an If? I think that is whats screwing with me.

;Opt("RunErrorsFatal", 0)
$sw = ""
$cmdpar = ""
$gd = ""
If $CmdLine[0] > 0 Then
    $SW = $CmdLine[1]
EndIf
$sw = StringLower($SW)
If StringInStr($sw,"s") AND StringInStr($sw,"r") Then
    $cmdpar = "2"
ElseIf StringInStr($sw,"s") Then
    $cmdpar = "1"
ElseIf StringInStr($sw,"r") Then
    $cmdpar  = "0"
EndIf
If $cmdpar = "1" OR "2" Then
    Opt("TrayIconHide", 1)
EndIf

This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

Share this post


Link to post
Share on other sites

Not sure, but you can definitely do this:

if ($cmdPar = 1 or $cmdPar = 2) then traySetState(@SW_HIDE)

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