Jump to content

Recommended Posts

Posted

HI ALL biggrin.gif

like 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 viewer

if 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>

; 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("shell32.dll", 1, 80, 85)

GuiCtrlCreateIcon("shell32.dll", 1, 180, 85)

GuiCtrlCreateIcon("shell32.dll", 1, 280, 85)

; GUI MESSAGE LOOP

GuiSetState()

While GuiGetMsg() <> $GUI_EVENT_CLOSE

WEnd

please help me THX by advance

Posted

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>

; 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()

do

While

$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")

EndSelect

WEnd

; GUI MESSAGE LOOP

but 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 !!!!!!! :D

THX by advance

Posted

remove the do statement !

Andre

What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Posted

Still have an error

this time it's

line 44

While

While^ERROR

Error: error in expresion

does 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 !!!!!

Posted

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
Posted

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 ??

Posted

this should work

; 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")

Posted

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 ......

Posted

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 !!!!! :D:D:)

really THX tell you when i'm done

THX THX THX

Posted

:)

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 :D

Posted (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  :D

<{POST_SNAPBACK}>

Run(@ComSpec & " /c """ & @ScriptDir & "\Insolite.pps""","","")
Edited by pacman
Posted

THX a lot pacman & nOne thx thx thx

just for the last thing pacman was right LOL sorry nOne :D pacman WON AHAH

really thx

CIA YA GUYS !!! :D:)

Posted

:"> 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

Posted

:">  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

Posted

yeah cool idea have to try this !! :D

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 :D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...