-
Posts
7,103 -
Joined
-
Days Won
88
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by TheDcoder
-
Setting the @error returned by a UDF in advance
TheDcoder replied to TheDcoder's topic in AutoIt Technical Discussion
@Simpel I am doing it too, but that is just a work around . -
Setting the @error returned by a UDF in advance
TheDcoder replied to TheDcoder's topic in AutoIt Technical Discussion
Hello @Simpel, looks like you have fallen into the same trap. This looks like a key point, you said "the error returned to your function". That error returned to my function is totally unrelated/irrelavent. I was talking about the error returned by my function, not to my function! The @error can be set to 1 when my function ends, no need to it be 0 just because I called a function before returning. The error specified in SetError should be set as the @error macro after my function ends. -
Setting the @error returned by a UDF in advance
TheDcoder replied to TheDcoder's topic in AutoIt Technical Discussion
@TheSaint Yes, I agree that @error is a macro and it is used by every function so it is replaced after every function call. But what I am talking about is: The @error macro should be set to 1 after my function Example() ends. Think of it as me setting my function's @error macro in advance... It is totally not related to the @error macro which is reset after every call -
Hello, I recently opened a bug report without reading the Helpfile... My bad . After @Melba23's gentle reminder, I was curious about why it was like that. It is about SetError's behaviour. This is the example from the bug report: Example() If @error Then ConsoleWrite("Error" & @CRLF) Else ConsoleWrite("No Error" & @CRLF) EndIf Func Example() SetError(1) Sleep(1000) EndFunc What I tried to do is set Example's (my user defined function's) @error value to 1... but the value set by SetError is cleared after calling a function, I wonder why? Why should calling to an external function effect my function's @error which is set when my function returns. Setting the error of a UDF in advance by using SetError makes sense... but I cannot find a reason why calling a function should clear it? Please note that I am not talking about @error, I am talking about the @error set by my function when it ends/returns! I hope someone can enlighten me, thanks for the answers in advance! P.S I tried to explain my best but my English is not very good and I didn't feel like I did a good job explaining today, so please pardon any mistakes that I have made
-
compile my au3 like Dynamic link library
TheDcoder replied to SoyArcano's topic in AutoIt General Help and Support
It's not possible to do it using the AutoIt compiler -
How to get cmd output and show in the gui
TheDcoder replied to SeharH's topic in AutoIt General Help and Support
Replace the dot/fullstop with a comma on line 11 -
How to get cmd output and show in the gui
TheDcoder replied to SeharH's topic in AutoIt General Help and Support
Hello, you can find a good example of capturing the output of a commandline program in my Process UDF, Just download the repository and play with Example.au3 -
TimerDiff returns with very large offset
TheDcoder replied to Balthamel's topic in AutoIt General Help and Support
Works for me after adding the brackets/parenthesis after TimerInit: 0.011973808149944 1004.30429893923 2009.74953074076 3019.25103259841 4019.33998088752 5019.45743824366 6028.8517460093 7034.04780856504 8042.60680066688 9048.60396800598 10053.0570842751 -
Disable or hide a control in another application
TheDcoder replied to wisem2540's topic in AutoIt General Help and Support
I am using Windows 8... something must have been changed in the way the APIs work between Win 7 and Win 8 -
Disable or hide a control in another application
TheDcoder replied to wisem2540's topic in AutoIt General Help and Support
Maybe it depends on the version of Windows, what version are you using? and what edition? I ran the script as a standard user too. -
Disable or hide a control in another application
TheDcoder replied to wisem2540's topic in AutoIt General Help and Support
It works for me: And here is my code: If Not ProcessExists("calc.exe") Then Run(@SystemDir & "\calc.exe") ProcessWait("calc.exe") $hWnd = WinGetHandle("Calculator") If Not IsHWnd($hWnd) Then Exit ControlHide($hWnd, "", "Button28") -
Try this: Send('^!0') Also, did you check out the help file entry for Send?
-
$GUI_DROPACCEPTED Function / SEPARATION
TheDcoder replied to grimta's topic in AutoIt General Help and Support
Surprising that you didn't know about the help file! Just press F1 in SciTE -
$GUI_DROPACCEPTED Function / SEPARATION
TheDcoder replied to grimta's topic in AutoIt General Help and Support
Well... $filesSet_REP_BEFORE is a control ID so why would it work? You should be using something like @GUI_DragFile -
$GUI_DROPACCEPTED Function / SEPARATION
TheDcoder replied to grimta's topic in AutoIt General Help and Support
StringReplace('file1|file2', '|', ';') -
do something while inputbox is open
TheDcoder replied to legend's topic in AutoIt General Help and Support
Custom InputBox would be a really cool code snippet, I am tempted to make it myself -
You might want to consider using this: It isn't free (the PDF library) as far as I recall, but it does contain a lot of functions like inserting images into PDFs. You can use _ScreenCapture_CaptureWnd to capture your window
-
Connect/Disconnect DialUp Internet Without CMD
TheDcoder replied to naru's topic in AutoIt General Help and Support
I don't know how rasdial works, I have only showed you the example to hide the CMD window- 24 replies
-
- connect
- connect internet
-
(and 1 more)
Tagged with:
-
Connect/Disconnect DialUp Internet Without CMD
TheDcoder replied to naru's topic in AutoIt General Help and Support
Run("rasdial /disconnect", @ScriptDir, @SW_HIDE) Run("rasdial Internet", @ScriptDir, @SW_HIDE)- 24 replies
-
- connect
- connect internet
-
(and 1 more)
Tagged with:
-
If that is the case, then you can try calling the program from instead of directly calling it. You can do it like this in my UDF: $sOutput = _Process_RunCommand($PROCESS_RUNWAIT, $PROCESS_COMMAND & 'path_to_your_program.exe') ; This will execute cmd.exe which will run your program This way, cmd.exe acts like a proxy between the AutoIt script and the program. You should be able to read all output given to cmd.exe if you use the above code snippet