AMDONLINE Posted September 29, 2011 Share Posted September 29, 2011 Hi to everyone from a new Forum member, I have downloaded the software and finding difficulty with it as I am new to programming in general and I am quite puzzled trying to create the following ! What I am trying to do is to create a script which I can use in AutoPalay Media Studio whereby the user inserts info ( name/address etc) into text boxes. This info is then saved and transfers to a Microsoft Word document and the text is displayed as typed when the Word doc is opened. If anyone can help this would be appreciated- perhaps an example script is availavle but I could not find one in the Forum Kind Regards Andy Link to comment Share on other sites More sharing options...
sleepydvdr Posted September 29, 2011 Share Posted September 29, 2011 What is the AutoPlay program for? What you describe can all be done with AutoIt. #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
RogerRabbitsClone Posted September 29, 2011 Share Posted September 29, 2011 i think "inputbox()" and "_WordDocAdd" will do what you need. but shouldnt you be able to do this all in auto play? <--a good way to start you day Link to comment Share on other sites More sharing options...
AMDONLINE Posted September 29, 2011 Author Share Posted September 29, 2011 When you refer to Autoplay, its a program I am using to create my own windows based program within which a user inputs project detail text in text boxes being the Client name/address etc. This info then appears on a word doc when the selected command button is clicked to open the word doc. I hope I have explained this better to you. Many Thanks Andy Link to comment Share on other sites More sharing options...
AMDONLINE Posted September 29, 2011 Author Share Posted September 29, 2011 Hi, I went on the Autoplay Forum and was pointed in this direction ? Andy Link to comment Share on other sites More sharing options...
sleepydvdr Posted September 29, 2011 Share Posted September 29, 2011 My question is: do you really need AutoPlay? I am just wondering if you have a specific purpose for using that program or if you think you need that program because you don't realize that AutoIt can do everything you want without AutoPlay. I ask this because I don't want to waste time pointing you in one direction and later finding out your needs were different from what I assumed. #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
sleepydvdr Posted September 29, 2011 Share Posted September 29, 2011 Here's something simple to start with. See if this is anywhere near what you are looking for. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("MyGui", 270, 178) $Input1 = GUICtrlCreateInput("", 16, 26, 121, 21) $Label1 = GUICtrlCreateLabel("Client Name", 16, 8, 61, 17) $Label2 = GUICtrlCreateLabel("Address", 16, 66, 42, 17) $Input2 = GUICtrlCreateInput("", 16, 80, 121, 21) $Label3 = GUICtrlCreateLabel("Etc", 16, 122, 20, 17) $Input3 = GUICtrlCreateInput("", 16, 136, 121, 21) $Button1 = GUICtrlCreateButton("Write To Word", 152, 64, 99, 57) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ShellExecute("winword") WinWaitActive("Microsoft Word") Opt("WinTitleMatchMode", 2) Sleep(250) $clientName = GUICtrlRead($Input1) $address = GUICtrlRead($Input2) $etc = GUICtrlRead($Input3) Send($clientName & @CR & $address & @CR & $etc) EndSwitch WEnd #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
AMDONLINE Posted September 30, 2011 Author Share Posted September 30, 2011 Thanks for that Sleepydvdr, thats pretty much what I am after If you could just amend slightly that would be great Client nameNo./StreetTownCountyPostcode. The rest is fine. I would do myself and have tried to do so but the layout numbers( 15,136 etc are causing me issues and I need to try and learn this soon ! Thanks Andy Link to comment Share on other sites More sharing options...
AMDONLINE Posted September 30, 2011 Author Share Posted September 30, 2011 Can anyone help ? Link to comment Share on other sites More sharing options...
Unsigned Posted September 30, 2011 Share Posted September 30, 2011 First, read the rules on bumping topics. Second, try using Koda (Alt+M in SciTE). It's a form (GUI) designer that should do exactly what you need. . Link to comment Share on other sites More sharing options...
AMDONLINE Posted September 30, 2011 Author Share Posted September 30, 2011 Apologies, just over anxiuos. I have opened up SciTE nd pressed keyboard Alt M but nothing is happening. I cannot seem to access a GUI interface? Link to comment Share on other sites More sharing options...
Developers Jos Posted September 30, 2011 Developers Share Posted September 30, 2011 Load the full version, the standard does have this option. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
sleepydvdr Posted September 30, 2011 Share Posted September 30, 2011 If you are having trouble with finding Koda, here is the website: http://koda.darkhost.ru/page.php?id=download And here is a little video I made to show you how to make what you want in Koda: http://www.digifract.com/AutoItTrainingVideo/01/HowToUseKoda.html #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
AMDONLINE Posted September 30, 2011 Author Share Posted September 30, 2011 Thank you for your help. It looked like i had the light version installed and am now a loot clearer with everything now that i have installed the full version. Thanks Again Andy Unsigned 1 Link to comment Share on other sites More sharing options...
AMDONLINE Posted September 30, 2011 Author Share Posted September 30, 2011 Hi, I have compiled my first script but something is not quite right. Cant spot it my self and was hoping one of your more experienced users could take a look at the script below and advise : #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=form1.kxf $Form1_1 = GUICreate("Form1", 615, 631, 192, 124) GUICtrlCreateInput("", 224, 32, 257, 24) GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlCreateInput("", 224, 88, 257, 24) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Label1 = GUICtrlCreateLabel("Client Name", 128, 34, 84, 20) GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlCreateInput("", 224, 144, 257, 24) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Label2 = GUICtrlCreateLabel("Address Line 1", 121, 90, 91, 20) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Label3 = GUICtrlCreateLabel("Address Line 2", 121, 146, 91, 20) GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlCreateInput("", 224, 200, 257, 24) GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlCreateInput("", 224, 256, 257, 24) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Label4 = GUICtrlCreateLabel("City", 185, 202, 27, 20) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Label5 = GUICtrlCreateLabel("County", 167, 258, 45, 20) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Input6 = GUICtrlCreateInput("", 224, 312, 129, 24) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Label6 = GUICtrlCreateLabel("Postcode", 153, 314, 59, 20) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Label7 = GUICtrlCreateLabel("Project Reference", 105, 361, 107, 20) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Input1 = GUICtrlCreateInput("", 224, 359, 313, 24) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $Button1 = GUICtrlCreateButton("Copy to Word", 424, 464, 113, 65) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $ClientName = GUICtrlRead($Input1) $AddressLine1 = GUICtrlRead($Input2) $AddressLine2 = GUICtrlRead($Input3) $City = GUICtrlRead($Input4) $County = GUICtrlRead($Input5) $Postcode = GUICtrlRead($Input6) $ProjectReference = GUICtrlRead($Input7) ShellExecute("winword") WinWaitActive("Microsoft Word") Opt("WinTitleMatchMode" , 2) Sleep(250) Send($ClientName & @CR & $AddressLine1 & @CR & $AddressLine2 & @CR & $City & @CR & $County & @CR & $Postcode & @CR & $ProjectReference) EndSwitch WEnd Any help again would be much appreciated Andy Link to comment Share on other sites More sharing options...
AMDONLINE Posted September 30, 2011 Author Share Posted September 30, 2011 Attached is the au3 file if it makes things easier to view. AndyContact details code.au3 Link to comment Share on other sites More sharing options...
Beege Posted September 30, 2011 Share Posted September 30, 2011 (edited) AMDONLINE, in the future a better (and much more like) way of posting long code is to put it into a code box. Theres a button with the autoit symbol on the editor tool bar that you can use or just put your code between the autoit tags. code Give me a min while I look at your code. edit: wtf that didnt work Edited September 30, 2011 by Beege Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
Beege Posted September 30, 2011 Share Posted September 30, 2011 Your variables are not declared for your input boxes. $Form1_1 = GUICreate("Form1", 615, 631, 192, 124) GUICtrlCreateInput("", 224, 32, 257, 24); <<<< Nothing declared GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlCreateInput("", 224, 88, 257, 24) just go back and add them in. easy fix $Form1_1 = GUICreate("Form1", 615, 631, 192, 124) $input1 = GUICtrlCreateInput("", 224, 32, 257, 24); GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlCreateInput("", 224, 88, 257, 24) Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
AMDONLINE Posted October 1, 2011 Author Share Posted October 1, 2011 Thank you, sorted it out no problems 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