whiteeey32 Posted December 1, 2008 Posted December 1, 2008 I try to minimize a window in vb but just can't seem to get it any ideas? CODEstrwindowtitle = "Privoxy" intResult = cAutoit.WinExists(strwindowtitle, strwindowtext) If intResult = 0 Then cAutoit.Run "C:\Program Files\Vidalia Bundle\Privoxy\privoxy.exe" cAutoit.Sleep 300 cAutoit.WinSetState strwindowtitle, "", SW_MINIMIZE Else cAutoit.WinSetState strwindowtitle, "", minimize End If
PsaltyDS Posted December 1, 2008 Posted December 1, 2008 I try to minimize a window in vb but just can't seem to get it any ideas? strwindowtitle = "Privoxy" intResult = cAutoit.WinExists(strwindowtitle, strwindowtext) If intResult = 0 Then cAutoit.Run "C:\Program Files\Vidalia Bundle\Privoxy\privoxy.exe" cAutoit.Sleep 300 cAutoit.WinSetState strwindowtitle, "", SW_MINIMIZE Else cAutoit.WinSetState strwindowtitle, "", minimize End If Try using a cAutoit reference for the state values (as in the help file example): strwindowtitle = "Privoxy" intResult = cAutoit.WinExists(strwindowtitle, strwindowtext) If intResult = 0 Then cAutoit.Run "C:\Program Files\Vidalia Bundle\Privoxy\privoxy.exe" cAutoit.Sleep 300 cAutoit.WinSetState strwindowtitle, "", cAutoit.SW_MINIMIZE Else cAutoit.WinSetState strwindowtitle, "", cAutoit.minimize End If Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
whiteeey32 Posted December 1, 2008 Author Posted December 1, 2008 Try using a cAutoit reference for the state values (as in the help file example): strwindowtitle = "Privoxy" intResult = cAutoit.WinExists(strwindowtitle, strwindowtext) If intResult = 0 Then cAutoit.Run "C:\Program Files\Vidalia Bundle\Privoxy\privoxy.exe" cAutoit.Sleep 300 cAutoit.WinSetState strwindowtitle, "", cAutoit.SW_MINIMIZE Else cAutoit.WinSetState strwindowtitle, "", cAutoit.minimize End If Works somewhat, it minimized the program into a smaller title bar in the lower left, the program itself will minimize to the system tray when closed or minimized thats what i would like it to do, is that a way to have it run in a minimized state?
FireFox Posted December 1, 2008 Posted December 1, 2008 Works somewhat, it minimized the program into a smaller title bar in the lower left, the program itself will minimize to the system tray when closed or minimized thats what i would like it to do, is that a way to have it run in a minimized state? Hi, If the program minimize on tray imself when closed have you tried alt+f4 or winclose ? WinActivate("window","") WinWaitActive("Window","",5) Send("{ALT}+{F4}") Winclose("Window","")
PsaltyDS Posted December 2, 2008 Posted December 2, 2008 Hi, If the program minimize on tray imself when closed have you tried alt+f4 or winclose ? WinActivate("window","") WinWaitActive("Window","",5) Send("{ALT}+{F4}") Winclose("Window","") He's not using regular AutoIt. This about running it through AutoItX COM/Active-X control. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
whiteeey32 Posted December 2, 2008 Author Posted December 2, 2008 He's not using regular AutoIt. This about running it through AutoItX COM/Active-X control. Your right, I'm scripting with VB so some of the commands are a little different than just auoit script
FireFox Posted December 2, 2008 Posted December 2, 2008 Your right, I'm scripting with VB so some of the commands are a little different than just auoit scriptIf it's for another language than autoit, why come you here for ask it ?Strange or I'm stupid like always
PsaltyDS Posted December 2, 2008 Posted December 2, 2008 If it's for another language than autoit, why come you here for ask it ?Strange or I'm stupid like always AutoItX is included with AutoIt. Look in your start menu at: Start/All Programs/AutoIt v3/Extras/AutoItXIt's purpose to allow using AutoIt functions from other languages, like VB.There is a specific support forum for it (which is perhaps where this topic should be): ActiveX/COM Help and Support (AutoItX) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
FireFox Posted December 2, 2008 Posted December 2, 2008 AutoItX is included with AutoIt. Look in your start menu at: Start/All Programs/AutoIt v3/Extras/AutoItXIt's purpose to allow using AutoIt functions from other languages, like VB.There is a specific support forum for it (which is perhaps where this topic should be): ActiveX/COM Help and Support (AutoItX) Thats i was saying, im stupid sorry
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