-
Posts
7,103 -
Joined
-
Days Won
88
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by TheDcoder
-
Cannot save word document - Strange/Unknown error
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
I doubt that there would be a "_Word_Test.doc" in @TempDir ready for me to open... I am guessing that you copy & pasted that from the example? By the way, I am trying to create an empty word document using the Word UDF. -
Cannot save word document - Strange/Unknown error
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
@Jfish Oh! , Thanks for pointing it out , Here is my modified code: #include <Word.au3> Global $oWord = _Word_Create(False, True) Global $oDoc = _Word_DocAdd($oWord) _Word_DocSaveAs($oDoc) MsgBox(0, @error, @extended) But... I am still getting the same error -
Hello, I am trying to save an word document but it won't work , This is my REALLY simple script: #include <Word.au3> Global $oWord = _Word_Create(False, True) _Word_DocSaveAs($oWord) MsgBox(0, @error, @extended) And my MsgBox: I know that its a COM error because @error is set 2... but what about the COM error code? I cannot find anything related to -2147352570!
-
Where is the (Microsoft) Word COM API located?
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
If anyone wants me to be specific, I am looking for a way to insert text into the "Outline" of the document rather than in the document itself! -
Try this code: #include <Array.au3> #include <String.au3> #include <ButtonConstants.au3> #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Form1", 863, 645, 192, 123) $Tab1 = GUICtrlCreateTab(8, 8, 841, 553, $TCS_FIXEDWIDTH) $Main = GUICtrlCreateTabItem("Main") $idDate1 = GUICtrlCreateMonthCal(@YEAR &'/'&@MON &'/'& @MDAY, 142, 157, 249, 185) $idDate2 = GUICtrlCreateMonthCal(@YEAR &'/'&@MON &'/'& @MDAY, 478, 157, 257, 185) $Label1 = GUICtrlCreateLabel("Start Date", 227, 125, 83, 28) GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("End Date", 563, 125, 82, 28) GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif") $go = GUICtrlCreateButton("Run", 568, 382, 99, 33) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $stop = GUICtrlCreateButton("Stop and Exit", 216, 382, 99, 33) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlCreateTabItem("") $Progress1 = GUICtrlCreateProgress(8, 608, 390, 25) $Progress2 = GUICtrlCreateProgress(430, 609, 390, 25) $Label5 = GUICtrlCreateLabel("Main Progress", 8, 584, 74, 17) $Label6 = GUICtrlCreateLabel("Current Process Progress", 429, 589, 123, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $stop Exit Case $go $Date1 = GUICtrlRead($idDate1) $Date2 = GUICtrlRead($idDate2) ;GuiDelete($Form1) $Date1 = StringSplit($Date1,'/',2) $Date2 = StringSplit($Date2,'/',2) MsgBox(0,'Date',$Date1[0] & '/' & $Date1[1] & '/' & $Date1[2] & ' - ' & $Date2[0] & '/' & $Date2[1] & '/' & $Date2[2]) EndSwitch WEnd You were using the same variable for the StringSplit string and the Date Control ID, The Date control ID would be overwritten when StringSplit is called... in the 2nd run GUICtrlRead cannot read the Date control because there is no control ID in $Date1 and $Date2.
-
How to use Autoit Inside QT (C++ Framework )
TheDcoder replied to Muhammad_Awais_Sharif's topic in AutoItX Help and Support
@Muhammad_Awais_Sharif There is a link called "Report post" at the top of every post .- 6 replies
-
- qt
- c++ framwork
-
(and 1 more)
Tagged with:
-
How to log info with Installshield
TheDcoder replied to ur's topic in AutoIt General Help and Support
There is no repository for UDFs, you have to just download the .au3 scripts from the web and read them in SciTE, that's the only way- 15 replies
-
- installshield
- run
-
(and 2 more)
Tagged with:
-
@edwick I have been successfully using VirtualBox to demo my scripts, they work just as well in VMs . If your setup was normal, everything should go fine!
- 2 replies
-
- virtual machine
- cloudify
-
(and 3 more)
Tagged with:
-
Oh, I am sad ... I will be waiting for a improved version though
- 10 replies
-
- perspective
- 3d
-
(and 1 more)
Tagged with:
-
How to log info with Installshield
TheDcoder replied to ur's topic in AutoIt General Help and Support
There are 2 ways you can use my UDF. The 1st is the simplest which returns the Exit Code + Output at the end, The 2nd one is more hard to do but with it you will be able to get the output from the start of the process! The 2nd method is demonstrated in the example script, its the part where you see live output from tracert google.com , you can study the code and check the documentation for more information .- 15 replies
-
- installshield
- run
-
(and 2 more)
Tagged with:
-
Here we have another strange issue again... Have anyone of you guys experienced a black hole? I mean, not a physical black hole , but a internet blackhole I have a situation where sometimes the selected records don't get received and I get an empty array: And sometimes the Query which I send to the MySQL server never reaches to it... Also, in both cases NO error was being reported.
-
No worries , I always appreciate input no matter how its presented to me . Thanks for the link! but I am not really very serious about this implementation of a PRNG , I only did this as an exercise... I know that this PRNG is highly unsuitable for any real world use... and I am not planning to make it a PRNG which can be used in Cryptographic operations!! I know that its VERY HARD . I just submitted this piece of code for someone who is looking to get started. I have decided to add a big red WARNING message near the code .
-
Hello! After watching a whole day of "Journey into cryptography" at Khan Academy, I have got to know the secrets behind some sneaky things! . This is one of em', A PRNG (Pseudo Random Number Generator). Its features (atleast what I believe) are: Simple, short and crappy. Great for beginners who are baffled by the mechanics of random number generation in computers! Support for custom seeds! EIGHT DIGITS OF RANDOMNESS!!! Unlike all other PRNGs, This one is predictable 1000 possible PRNs when using @MSEC as the seed. No option for min or max, the min is 10000000 and the max is 99999999. The Unlicensed . #cs LICENSE This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to <http://unlicense.org/> #ce LICENSE ; #FUNCTION# ==================================================================================================================== ; Name ..........: MiddleSquareRandom ; Description ...: Pseudo-random number generator based on the infamous "Middle Sqaure" method. ; Syntax ........: MiddleSquareRandom([$iSeed = @MSEC]) ; Parameters ....: $iSeed - [optional] A seed for generation of the random number. Default is @MSEC. ; Return values .: A pseudorandom 8 digit integer. ; Author ........: John von Neumann ; Modified ......: Damon Harris (TheDcoder) - Conversion into AutoIt and simplification + further crappification. ; Remarks .......: Fun Fact - The output is based on the $iSeed passed, Same $iSeed = Same pseudo-random number. ; Related .......: Random() ; Link ..........: https://en.wikipedia.org/wiki/Middle-square_method ; Example .......: ConsoleWrite(MiddleSquareRandom() & @CRLF) ; =============================================================================================================================== Func MiddleSquareRandom($iSeed = @MSEC) Local Const $TURNS = 8 Local $sRandomNumber, $sSeed For $iTurn = 1 To $TURNS $iSeed = $iSeed * 2 $sSeed = String($iSeed) $sRandomNumber &= StringMid($sSeed, Ceiling(StringLen($iSeed) / 2), 1) Next Return Int($sRandomNumber) EndFunc Enjoy your numbers, TD . P.S NEVER USE THIS FUNCTION IN A REAL WORLD IMPLEMENTATION OF SOMETHING WHICH USES RANDOM NUMBERS!!! THIS ONE IS VERY UNSUITABLE FOR THAT PURPOSE! READ THE POSTS BELOW FOR MORE INFORMATION.