windu Posted June 14, 2007 Share Posted June 14, 2007 hello guys, im totally new to autoit but i like the concept.. im a bit stucked on something but im sure autoit veterans can help me out and in fact this might be totally simple, however im missing it. im making simple script the will minimize everything, open two explorers in 'My Computer' and tile them vertically. So far it goes like: ;minimize all WinMinimizeAll() ;run 2xp on 'my comp' Run("explorer.exe /n, /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") Run("explorer.exe /n, /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") ;tile them vertically (how?) ..so i dont know how to tile 'em :/ any idea/help appreciated, thanks in advance.. Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 14, 2007 Share Posted June 14, 2007 Use WinMove along with the desktop size macros to place them manually. I don't think there is a way to tile them automatically. Link to comment Share on other sites More sharing options...
windu Posted June 14, 2007 Author Share Posted June 14, 2007 ty for quick reply, i used to do this in Delphi by embeding cmdow in main exe, then extract/execute it with "/tv" switch and deleting it after, which i considered to be bit unelegant lol. Will digg out what u've suggested later on but im abs sure there must be some win func to call for this... thanks for hints Mr Icekirby, much apreciated ! Link to comment Share on other sites More sharing options...
Helge Posted June 14, 2007 Share Posted June 14, 2007 I'm a total newbie at COM and have only been experimented a little bit with some basic stuff. Try this UDF : Func _WinTileVert() Local $oShell = ObjCreate("shell.application") If NOT IsObj($oShell) Then Return SetError(1) $oShell.TileVertically EndFunc Link to comment Share on other sites More sharing options...
windu Posted June 15, 2007 Author Share Posted June 15, 2007 /me sets mode: +beer Helge!*@* :-) cheers man! works like charm.. ok, just for the reference if anyone comes to this .. whole script: ;minimize all WinMinimizeAll() ;run 2xp on 'my comp' Run("explorer.exe /n, /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") Run("explorer.exe /n, /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") ;tile them vertically WinWaitActive("My Computer") _WinTileVert() ;tile.vert function by Helge Func _WinTileVert() Local $oShell = ObjCreate("shell.application") If NOT IsObj($oShell) Then Return SetError(1) $oShell.TileVertically EndFunc ;eof thanks again for all the inputs. Link to comment Share on other sites More sharing options...
Skan Posted June 15, 2007 Share Posted June 15, 2007 User32.DLL provides a couple of functions with more flexibility:Run("explorer.exe /n, /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}","", @SW_MAXIMIZE ) Run("explorer.exe /n, /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}","", @SW_MAXIMIZE ) Sleep( 1000 ) DllCall( "user32.dll", "int", "CascadeWindows", "int",0, "int",4, "int",0, "int",0, "int",0 ); Cascade Sleep( 3000 ) DllCall( "user32.dll", "int", "TileWindows", "int",0, "int",1, "int",0, "int",0, "int",0 ); Tile Horizontal Sleep( 3000 ) DllCall( "user32.dll", "int", "TileWindows", "int",0, "int",0, "int",0, "int",0, "int",0 ); Tile VerticalI am a newbie and this is my first snippet run in AU3 .. Hope I have put it right. Link to comment Share on other sites More sharing options...
windu Posted June 15, 2007 Author Share Posted June 15, 2007 great idea Skan & pretty cool effect when u do it one by one like that! :-) 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