cueclub Posted April 27, 2010 Share Posted April 27, 2010 Hey gang, Just wondering , I have been working with @DesktopHeight and @DesktopWidth , Question is, Can I set it to only allow for part of the screen. Something like $dh1 = (@DesktopHeight-100) $dw1 = (@DesktopWidth-100) GUICreate("test", $dh1, $dw1, 10, 10) hope it makes sense lol. Just trying to make it so it takes up only part of the scree, no matter the res settings. As Usual Thanks in advance Cue Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 27, 2010 Moderators Share Posted April 27, 2010 cueclub, Have you tried? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
cueclub Posted April 27, 2010 Author Share Posted April 27, 2010 Yes, Yes I did. After your reply. I wasnt,t actually sure if it would work, and had escaped my normal practice of posting without trying. Please forgive me Cue Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 27, 2010 Share Posted April 27, 2010 Yes, Yes I did.Darn, just as I was about to get out the ClueClub. 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 Link to comment Share on other sites More sharing options...
cueclub Posted April 27, 2010 Author Share Posted April 27, 2010 (edited) ok another problem expandcollapse popupmain() #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> func Main() $dh1 = (@DesktopHeight-100) $dw1 = (@DesktopWidth-100) $dh2 = (@DesktopHeight-300) $dw2 = (@DesktopWidth-110) GUICreate("test", $dh1, $dw1, 10, 10) _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("autoit.com", $dw1, $dh1, 10, 10) $GUIActiveX = GUICtrlCreateObj($oIE, 5, 30, $dw2, $dh2) GUISetState() ;Show GUI _IENavigate ($oIE, "autoit.com") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() Exit endfunc When I run it i get an "include" error in the output window. C:\Program Files\AutoIt3\Include\IE.au3 (3104) : ==> Variable used without being declared.: Return SetError($_IEStatus_Success, 0, 1) Return SetError(^ ERROR ->16:20:09 AutoIT3.exe ended.rc:1 Am I missing somthing in the script, or have I added somthing I shouldnt have? edit: finished question Edited April 27, 2010 by cueclub Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 27, 2010 Share Posted April 27, 2010 The code in the include files is inserted where the #include statement is located. You called Main() before the variable declarations in the include files got executed. 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 Link to comment Share on other sites More sharing options...
cueclub Posted April 27, 2010 Author Share Posted April 27, 2010 ah that would explain why it works with the function removed. But not as I had written it See that's why I like coming here, Much better to have more then 1 brain. Oh and the occasional sarcasm is nice too. Thx PsaltyDS Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 27, 2010 Share Posted April 27, 2010 You're welcome. That will cost you one donation to Jon's hosting bills.(The sarcasm is free.) 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 Link to comment Share on other sites More sharing options...
cueclub Posted April 27, 2010 Author Share Posted April 27, 2010 That will cost you one donation to Jon's hosting bills.I am planning on it. Well worth it in my book. Link to comment Share on other sites More sharing options...
GEOSoft Posted April 28, 2010 Share Posted April 28, 2010 (edited) As the salty one pointed out it's because of where you #included your files so maybe it's time for a statement about the general layout I use when creating a script. It's always better to stay with a consistant structure even if you don't use this one.Starting from the top of the scriptComment Block if requiredGlobal Constants ;; This is where I will have things like $Title and $Version. Just things I know are not in some constants file that I will #Include later#Include linesOpt()s ;; AutoIt optionsGlobal / Local variablesCalls to functions that can be made before the GUI (if there is a GUI)GUI Creation codeThe GUI LoopFunctionsEdit Spelling and change code block to quoteEdit 2 Added the last item and modified the one above it to read properly Edited April 28, 2010 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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