anystupidassname Posted July 31, 2005 Share Posted July 31, 2005 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#....... Link to comment Share on other sites More sharing options...
LxP Posted July 31, 2005 Share Posted July 31, 2005 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) Link to comment Share on other sites More sharing options...
LxP Posted July 31, 2005 Share Posted July 31, 2005 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? Link to comment Share on other sites More sharing options...
anystupidassname Posted July 31, 2005 Author Share Posted July 31, 2005 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#....... Link to comment Share on other sites More sharing options...
anystupidassname Posted July 31, 2005 Author Share Posted July 31, 2005 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#....... Link to comment Share on other sites More sharing options...
LxP Posted July 31, 2005 Share Posted July 31, 2005 Not sure, but you can definitely do this: if ($cmdPar = 1 or $cmdPar = 2) then traySetState(@SW_HIDE) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now