xStylezx Posted May 23, 2007 Share Posted May 23, 2007 Just wanted to say first that i love autoit.At first glance it can seem a bit daunting,but im learning more every day.Now if i could just remember it all Now for the problem.I imagine its fairly simple but ive had no luck getting it figured out so far.Im using an inputbox to set the level of transparency of firefox.It is working great ,but the issue is that if you decide to hit cancel inside the input box it seems to apply a value of 0 which makes firefox invisible.I then have to open inputbox again and set a value of 255 to be able to see the fox again.How would i stop it from altering the transparency if cancel is clicked?Here is a peak at what i have,which is working fine except for the problem i just mentioned $transcust = InputBox ( "Enter Transparency Customization", "Use a number from 0-255." & @CRLF & "0 being invisible,and 255" & @CRLF & "being solid,or completely" & @CRLF & "visible.Canceling will set 0," & @CRLF & "or invisible", "255", " M") If WinActive("[CLASS:MozillaUIWindowClass]", "") Then WinSetTrans("[CLASS:MozillaUIWindowClass]", "", $transcust) Else WinActivate("[CLASS:MozillaUIWindowClass]", "") WinSetTrans("[CLASS:MozillaUIWindowClass]", "", $transcust) EndIf Thanks for the help Link to comment Share on other sites More sharing options...
Zedna Posted May 23, 2007 Share Posted May 23, 2007 (edited) $transcust = InputBox("Enter Transparency Customization", "Use a number from 0-255." & @CRLF & "0 being invisible,and 255" & @CRLF & "being solid,or completely" & @CRLF & "visible.Canceling will set 0," & @CRLF & "or invisible", "255", " M") If Not @error Then If WinActive("[CLASS:MozillaUIWindowClass]", "") Then WinSetTrans("[CLASS:MozillaUIWindowClass]", "", $transcust) Else WinActivate("[CLASS:MozillaUIWindowClass]", "") WinSetTrans("[CLASS:MozillaUIWindowClass]", "", $transcust) EndIf EndIfoÝ÷ Ù±!?Û+mê)¶)¢Íçoz»"¢v®¶sbb33c·G&ç67W7BÒçWD&÷gV÷C´VçFW"G&ç7&Væ77W7FöÖ¦FöâgV÷C²ÂgV÷CµW6RçVÖ&W"g&öÒÓ#SRâgV÷C²fײ5$ÄbfײgV÷C³&Værçf6&ÆRÆæB#SRgV÷C²fײ5$ÄbfײgV÷C¶&Vær6öÆBÆ÷"6ö×ÆWFVÇgV÷C²fײ5$ÄbfײgV÷C·f6&ÆRä6æ6VÆærvÆÂ6WBÂgV÷C²fײ5$ÄbfײgV÷C¶÷"çf6&ÆRgV÷C²ÂgV÷C³#SRgV÷C²ÂgV÷C²ÒgV÷C²¤bæ÷BW'&÷"FVà bæ÷Bvä7FfRgV÷Cµ´4Ä53¤Ö÷¦ÆÆTvæF÷t6Æ75ÒgV÷C²ÂgV÷C²gV÷C²FVà vä7FfFRgV÷Cµ´4Ä53¤Ö÷¦ÆÆTvæF÷t6Æ75ÒgV÷C²ÂgV÷C²gV÷C² VæD` vå6WEG&ç2gV÷Cµ´4Ä53¤Ö÷¦ÆÆTvæF÷t6Æ75ÒgV÷C²ÂgV÷C²gV÷C²Âb33c·G&ç67W7B¤VæD` Edited May 23, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
xStylezx Posted May 23, 2007 Author Share Posted May 23, 2007 Excellent,it works,and thanks for the quick response.Could you by chance elaborate on how/why yours is optimized?Im trying to learn as much as possible.Was scratching my head a couple hours about that Link to comment Share on other sites More sharing options...
Zedna Posted May 23, 2007 Share Posted May 23, 2007 (edited) Excellent,it works,and thanks for the quick response.Could you by chance elaborate on how/why yours is optimized?Im trying to learn as much as possible.Was scratching my head a couple hours about that optimization: WinSetTrans("[CLASS:MozillaUIWindowClass]", "", $transcust) is only once in my code (smaller output EXE) Edited May 23, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
xStylezx Posted May 23, 2007 Author Share Posted May 23, 2007 (edited) optimization: WinSetTrans("[CLASS:MozillaUIWindowClass]", "", $transcust) is only once in my code (smaller output EXE) Oh ok,thanks.I havent played with If Not yet,that was in your code,interesting. Edited May 23, 2007 by xStylezx 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