mumuuu Posted March 10, 2005 Share Posted March 10, 2005 HI ALL biggrin.giflike i sayed i'm a noob but i need to do some thing, i need to do with autoit a window which there is in it 3 icon qith powerpoint visual on it ( i don't know how to put the powerpoint skin on it ) for the skin of the icon i know i've to change the "shell32.dl" by the one which is used by powerpoint but which one ???and i need to atach 3 files to 3 lines and when u click on one of Tose 3 lines the PPS is auto lunch under POwerpoint viewerif u have an idea please help me this is very important !!!here is my script ( i'm using the base of one of the example )#include <GuiConstants.au3>; GUIGuiCreate(@SystemDir & "Orditec Services", 400, 400)GuiSetIcon(@SystemDir & "\mspaint.exe", 0); MENU;GuiCtrlCreateMenu(""); CONTEXT MENU$contextMenu = GuiCtrlCreateContextMenu()GuiCtrlCreateMenuItem("Context Menu", $contextMenu)GuiCtrlCreateMenuItem("", $contextMenu) ;separatorGuiCtrlCreateMenuItem("&Properties", $contextMenu); PICGuiCtrlCreatePic("nav_r1_c1.gif",0,0, 400,50); LISTGuiCtrlCreateList("", 50, 240, 300, 90)GuiCtrlSetData(-1, "1.Présentaition général 1|2.Infragérance|3.Pole ingénieurie"); ICONGuiCtrlCreateIcon("shell32.dll", 1, 80, 85)GuiCtrlCreateIcon("shell32.dll", 1, 180, 85)GuiCtrlCreateIcon("shell32.dll", 1, 280, 85); GUI MESSAGE LOOPGuiSetState()While GuiGetMsg() <> $GUI_EVENT_CLOSEWEndplease help me THX by advance Link to comment Share on other sites More sharing options...
mumuuu Posted March 10, 2005 Author Share Posted March 10, 2005 ok i found for the icons & now it's like this ..; AutoIt 3.0.103 example; 17 Jan 2005 - CyberSlug; This script shows manual positioning of all controls;; there are much better methods of positioning...#include <GuiConstants.au3>; GUIGuiCreate(@SystemDir & "Orditec Services", 400, 400)GuiSetIcon(@SystemDir & "\mspaint.exe", 0); MENU ;GuiCtrlCreateMenu(""); CONTEXT MENU$contextMenu = GuiCtrlCreateContextMenu()GuiCtrlCreateMenuItem("Context Menu", $contextMenu)GuiCtrlCreateMenuItem("", $contextMenu) ;separatorGuiCtrlCreateMenuItem("&Properties", $contextMenu); PICGuiCtrlCreatePic("nav_r1_c1.gif",0,0, 400,50); LIST;GuiCtrlCreateList("", 50, 240, 300, 90);GuiCtrlSetData(-1, "1.Présentaition général 1|2.Infragérance|3.Pole ingénieurie"); ICONGuiCtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE", 0, 180, 85)GuiCtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE", 0, 180, 170)GuiCtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE", 0, 180, 255); BUTTON$gen = GUICtrlCreateButton("présentation générale", 140, 120, 120, 20)$inf = GUICtrlCreateButton("présentation infragérence", 130, 205, 140, 20)$boh = GUICtrlCreateButton("présentation général", 140, 290, 120, 20)GuiSetState()doWhile $clikos = run() Select Case $clikos= $gen Run("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE") Case $msg= $inf MsgBox(0,"You clicked on", "No") Case $msg= $boh MsgBox(0,"You clicked on", "Exit"); Case $msg= $GUI_EVENT_CLOSE; MsgBox(0,"You clicked on", "Close") EndSelectWEnd; GUI MESSAGE LOOPbut i've an error it's this :Line 64 (file" C:\Program Files\AutoIt3\Examples\GUI\presentation orditec.au3"):ERROR: "DO" Statement has no matching "until statement.NOW my only pb it's to say to this script to lunch 1 file for a specific bouton & another file to another button PLEASE HELP ME !!!!!!! THX by advance Link to comment Share on other sites More sharing options...
Andre Posted March 10, 2005 Share Posted March 10, 2005 remove the do statement ! Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
mumuuu Posted March 10, 2005 Author Share Posted March 10, 2005 Still have an error this time it's line 44 WhileWhile^ERROR Error: error in expresiondoes there is a way to lunch a file when i'm clicking myself on an icon or no ??? if yes what is the syntax Please because i'm gonna be crazy LOL if i can't do this tell me because i've to find another way to script this little tweak for my client !!!!! Link to comment Share on other sites More sharing options...
nOne Posted March 10, 2005 Share Posted March 10, 2005 your while needs some parameters from the helpfile: loops 11 times: $i = 0 While $i <= 10 MsgBox(0, "Value of $i is:", $i) $i = $i + 1 WEnd endless loop: While 1 MsgBox(0, "asd", "asd") sleep(10) WEnd Link to comment Share on other sites More sharing options...
mumuuu Posted March 10, 2005 Author Share Posted March 10, 2005 don't know why i should use a loop to tell my script to run a FIle when a user is clicking a button ??????? like i've 3 button each button can lunch a file user have to click on a button of his choice like button 1 => run blah.pps button 2 => run boh.pps button 3 => run yeah.pps if u see what i want to do ??? or if u see beter now ?? Link to comment Share on other sites More sharing options...
nOne Posted March 10, 2005 Share Posted March 10, 2005 this should work expandcollapse popup; AutoIt 3.0.103 example ; 17 Jan 2005 - CyberSlug ; This script shows manual positioning of all controls; ; there are much better methods of positioning... #include <GuiConstants.au3> ; GUI GuiCreate(@SystemDir & "Orditec Services", 400, 400) GuiSetIcon(@SystemDir & "\mspaint.exe", 0) ; MENU ;GuiCtrlCreateMenu("") ; CONTEXT MENU $contextMenu = GuiCtrlCreateContextMenu() GuiCtrlCreateMenuItem("Context Menu", $contextMenu) GuiCtrlCreateMenuItem("", $contextMenu);separator GuiCtrlCreateMenuItem("&Properties", $contextMenu) ; PIC GuiCtrlCreatePic("nav_r1_c1.gif",0,0, 400,50) ; LIST ;GuiCtrlCreateList("", 50, 240, 300, 90) ;GuiCtrlSetData(-1, "1.Présentaition général 1|2.Infragérance|3.Pole ingénieurie") ; ICON GuiCtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE", 0, 180, 85) GuiCtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE", 0, 180, 170) GuiCtrlCreateIcon("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE", 0, 180, 255) ; BUTTON $gen = GUICtrlCreateButton("présentation générale", 140, 120, 120, 20) $inf = GUICtrlCreateButton("présentation infragérence", 130, 205, 140, 20) $boh = GUICtrlCreateButton("présentation général", 140, 290, 120, 20) GuiSetState() While 1 $msg = GUIGetMsg() Select Case $msg= $gen Run("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE") Case $msg= $inf MsgBox(0,"You clicked on", "No") Case $msg= $boh MsgBox(0,"You clicked on", "Exit") ; Case $msg= $GUI_EVENT_CLOSE ; MsgBox(0,"You clicked on", "Close") EndSelect WEnd ; GUI MESSAGE LOOP if you click the first button it will execute this : Run("C:\Program Files\Microsoft Office\OFFICE11\PPTVIEW.EXE") Link to comment Share on other sites More sharing options...
mumuuu Posted March 10, 2005 Author Share Posted March 10, 2005 OK cool it's working but now if i want this button to lunch a PPS file i've an error LOL does run only allow to execute a .EXE file ???? really strange ...... Link to comment Share on other sites More sharing options...
nOne Posted March 10, 2005 Share Posted March 10, 2005 this will run a .pps file Run(@comSpec & " /c D:\some.pps","","") Link to comment Share on other sites More sharing options...
mumuuu Posted March 10, 2005 Author Share Posted March 10, 2005 nOne YOUR THE MAN THX for everything now everything is woking just have to try your last post for to lunch pps & it'll be done really HUGE THANKS for your help for your time you are GREAT !!!!! really THX tell you when i'm done THX THX THX Link to comment Share on other sites More sharing options...
mumuuu Posted March 10, 2005 Author Share Posted March 10, 2005 not working because i try a tweak let me explain why the script and the PPS are in the same folder & it could be on a USB KEY or on a cd so i changed your line in => Run(@comSpec & "@SystemDir\Insolite.pps","","" if it's like this i can tell autoit to run the pps which is called insolite & which is in the same folder as my .au3 (or my .exe file after a compilation) please answer me & i'll be done Link to comment Share on other sites More sharing options...
nOne Posted March 10, 2005 Share Posted March 10, 2005 hehe no problem this should work ^^ Run(@comSpec & " /c " & @scriptdir &"\Insolite.pps","","") Link to comment Share on other sites More sharing options...
SumTingWong Posted March 10, 2005 Share Posted March 10, 2005 (edited) not working because i try a tweak let me explain why the script and the PPS are in the same folder & it could be on a USB KEY or on a cd so i changed your line in => Run(@comSpec & "@SystemDir\Insolite.pps","",""if it's like this i can tell autoit to run the pps which is called insolite & which is in the same folder as my .au3 (or my .exe file after a compilation) please answer me & i'll be done <{POST_SNAPBACK}>Run(@ComSpec & " /c """ & @ScriptDir & "\Insolite.pps""","","") Edited March 10, 2005 by pacman Link to comment Share on other sites More sharing options...
mumuuu Posted March 10, 2005 Author Share Posted March 10, 2005 THX a lot pacman & nOne thx thx thx just for the last thing pacman was right LOL sorry nOne pacman WON AHAH really thx CIA YA GUYS !!! Link to comment Share on other sites More sharing options...
mumuuu Posted March 10, 2005 Author Share Posted March 10, 2005 :"> oups guys when i put my .exe file and gif etc etc & i put a folder with the powerpoint viewver but when i lunch my autoit script & when i click on button to open pps like u should know i've windows pop up which don't know .pps extension LOL HOW can i tell autoit to run the pps with powerpoint viewver which is in a folder called "BLAH" in an USB KEY ( name of it can change depend of computer setup ... ) THX by advance of your answers Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 10, 2005 Share Posted March 10, 2005 :"> oups guys when i put my .exe file and gif etc etc & i put a folder with the powerpoint viewver but when i lunch my autoit script & when i click on button to open pps like u should know i've windows pop up which don't know .pps extension LOL HOW can i tell autoit to run the pps with powerpoint viewver which is in a folder called "BLAH" in an USB KEY ( name of it can change depend of computer setup ... )THX by advance of your answers<{POST_SNAPBACK}>Where in the registry does it store the location of your .pps viewer? You could read the location from there with a RegRead() function. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
mumuuu Posted March 11, 2005 Author Share Posted March 11, 2005 yeah cool idea have to try this !! or i can ask user if they have powerpoint or the veiwer and if they don't autoit will install it !!!!! or maybe there is a way t make an autosearch of a afot on a computer ..........have to work on all of that C YA 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