John117 Posted December 6, 2007 Share Posted December 6, 2007 (edited) Hey, I have about 50 pics that load into a gui at different times and a lot of code that determines which loads and when. There are times (as often as not) when the images will need to be horizontally flipped. Is it possible to do this with out naming all my pictures with a R, L ending? I would really like to not have to double code A modified help example: -suppose then the mouse changes directions, I would like to see the other side (yes I know its not really the other side, just the one side reversed) expandcollapse popup;----- example 2 #include <GUIConstants.au3> $gui=GUICreate("test transparentpic", 200, 100) $pic=GUICreate("", 126, 38, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) GUICtrlCreatePic(@Systemdir & "\oobe\images\mouse.gif",0,0, 0,0) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) HotKeySet("{ESC}", "main") HotKeySet("{LEFT}", "left") HotKeySet("{RIGHT}", "right") HotKeySet("{DOWN}", "down") HotKeySet("{UP}", "up") $picPos = WinGetPos($pic) $guiPos = WinGetPos($gui) do $msg = GUIGetMsg() until $msg = $GUI_EVENT_CLOSE Exit Func main() $guiPos = WinGetPos($gui) WinMove($gui,"",$guiPos[0]+10,$guiPos[1]+10) EndFunc Func left () $picPos = WinGetPos($pic) WinMove($pic,"",$picPos[0]-10,$picPos[1]) EndFunc Func right() $picPos = WinGetPos($pic) WinMove($pic,"",$picPos[0]+10,$picPos[1]) EndFunc Func down() $picPos = WinGetPos($pic) WinMove($pic,"",$picPos[0],$picPos[1]+10) EndFunc Func up() $picPos = WinGetPos($pic) WinMove($pic,"",$picPos[0],$picPos[1]-10) EndFunc Edited December 6, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
John117 Posted December 6, 2007 Author Share Posted December 6, 2007 Not a single reply? Link to comment Share on other sites More sharing options...
martin Posted December 6, 2007 Share Posted December 6, 2007 Not a single reply?I probably don't understand what you're asking, but why not just have a button for flipping the picture horizontally?If you mean that you don't want to have to keep doing that everytime you load the same picture then you could make an ini file and write the file names of all the pictures which have been flipped, so every time you load a picture, if it's in the ini file then flip it. Of course you will have to keep track of exactly what has happened so that you can decide you don't want a picture flipped any more. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
John117 Posted December 6, 2007 Author Share Posted December 6, 2007 (edited) Hey, thanks for the reply! Really all I am trying to do is find any form of code that will flip a picture horizontally. I can control when it will flip and what tells it do that function what I can not find is if it is possible to load or set a picture flipped horizontally. Ex (what Im doing now) -I have pic 1.gif and pic 1R.gif $PicFile1 = "Pic 1" $PicFilter = "gif" $PicFileH = "R" $PicCtrl1 = GUICtrlCreatePic($PicDir & $PicFile1 & $PicFilter, 0, 0, 10, 10) ;Then when I want to change GUICtrlSetImage($PicCtrl1, $PicDir & "\" & $PicFile1 & $PicFileH & $PicFilter)oÝ÷ Øw«{lÂ# .Ùbëhv!j÷©Í`ú'&®¶sbb33cµ4fÆSÒgV÷Cµ2ævbgV÷C°¢b33cµ47G&ÃÒuT7G&Ä7&VFU2b33cµ4F"fײb33cµ4fÆS£µFVâvVâvçBFò6ævP¤uT7G&Å6WDÖvRb33cµ47G&ÃÂb33cµ4F"fײgV÷C²b3#²gV÷C²fײb33cµ4fÆSÂfÆVB Edited December 6, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
ptrex Posted December 6, 2007 Share Posted December 6, 2007 @MatchedaWhy don't you give ImageMagick in AU3 a change ?-rotate degrees apply Paeth rotation to the imageregards,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
John117 Posted December 6, 2007 Author Share Posted December 6, 2007 @ptrex Thanks for the homework! 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