Jump to content

Recommended Posts

  • Moderators
Posted

Mine is Windows . Ummmm......sorry for asking so many newbie quetions but what am i suppose to do with that CODE???

Thanks again =D

LOL... That says alot, is it Windows 3.1 :think:?

@Valuater - Still should have an error handler there IMO.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Win9x systems don't have the psapi.dll

2 things to do

1 add the error handling in the function

2 if win9x fileinstall the file maybe

Func _ReduceMemory($dll = "psapi.dll")
    Local $ai_Return = DllCall($dll, 'int', 'EmptyWorkingSet', 'long', -1)
    If @error Then Return 1
    Return $ai_Return[0]
EndFunc  ;==>_ReduceMemory

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

how about

Func _ReduceMemory($dll = "psapi.dll")
    If StringInStr(@OSTYPE, "WIN32_WINDOWS") And Not FileExists(@ScriptDir & "\psapi.dll") Then
        FileInstall("C:\Program Files\AutoIt3\psapi.dll", @ScriptDir & "\psapi.dll")
    EndIf
    Local $ai_Return = DllCall($dll, 'int', 'EmptyWorkingSet', 'long', -1)
    If @error Then Return 1
    Return $ai_Return[0]
EndFunc  ;==>_ReduceMemory

it seems he DID NOT already have Autoit on his system, so this would return an error only untill he downloads Autoit... the first button

Right??

8)

NEWHeader1.png

Posted

how about

Func _ReduceMemory($dll = "psapi.dll")
    If StringInStr(@OSTYPE, "WIN32_WINDOWS") And Not FileExists(@ScriptDir & "\psapi.dll") Then
        FileInstall("C:\Program Files\AutoIt3\psapi.dll", @ScriptDir & "\psapi.dll")
    EndIf
    Local $ai_Return = DllCall($dll, 'int', 'EmptyWorkingSet', 'long', -1)
    If @error Then Return 1
    Return $ai_Return[0]
EndFunc ;==>_ReduceMemory

it seems he DID NOT already have Autoit on his system, so this would return an error only untill he downloads Autoit... the first button

Right??

8)

Not sure if will still error after installing autoit, don't have any pre WinXP systems to test on.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

Hello,

This looks like a great tutorial, however, I get an error when I select the 'Show Me SciTE - Editor' (first button) from Step Number Two. The error is...

Titlebar - AutoIt Error

Message - Line 14 (File"D:\apps\Autoit_123\Lessons\Lesson-1.au3"):

no semi-colon is used for commands. ; Notice the "for" is highlighted and known as a commnad.

^ERROR

Error: Unknown function name.

I have found the reason for the error, but wanted to post it here in case some else is getting it and cannot find the solution. The issue is with the default action for files with the extension of AU3. When I double clicked on my first AU3 file, I was asked (Windows XP) what I wanted the defualt action to be when I double clicked an AU3 file. I selected 'run'. In the case of this tutorial, that is not the correct solution as the Lesson-1.au3 script is more a document to read than a script to run.

To change this setting, do the following...

Open Windows Explorer

Select Tools | Folder Options...

Select the 'File Types' tab

Select the entry for AU3 files

Select the Advanced button (lower right side)

Select the entry for 'Edit Script' under the 'Actions' section

Select the 'Set Default' button (middle right side)

Select OK

Select Close

Posted

I already have Autoit earlier. Mine is beta 3.1.1.99 and i already have IE. I just dont know why cant i open Autoit1-2-3.exe. Is the psapi.dll suppose to be in the Autoit1-2-3 file?

Posted (edited)

I already have Autoit earlier. Mine is beta 3.1.1.99 and i already have IE. I just dont know why cant i open Autoit1-2-3.exe. Is the psapi.dll suppose to be in the Autoit1-2-3 file?

try putting this file in the SAME folder as Autoit 123

it is from the autoit3 folder

8)

Edited by Valuater

NEWHeader1.png

Posted

Hello,

This looks like a great tutorial, however, I get an error when I select the 'Show Me SciTE - Editor' (first button) from Step Number Two. The error is...

Titlebar - AutoIt Error

Message - Line 14 (File"D:\apps\Autoit_123\Lessons\Lesson-1.au3"):

no semi-colon is used for commands. ; Notice the "for" is highlighted and known as a commnad.

^ERROR

Error: Unknown function name.

I have found the reason for the error, but wanted to post it here in case some else is getting it and cannot find the solution. The issue is with the default action for files with the extension of AU3. When I double clicked on my first AU3 file, I was asked (Windows XP) what I wanted the defualt action to be when I double clicked an AU3 file. I selected 'run'. In the case of this tutorial, that is not the correct solution as the Lesson-1.au3 script is more a document to read than a script to run.

To change this setting, do the following...

Open Windows Explorer

Select Tools | Folder Options...

Select the 'File Types' tab

Select the entry for AU3 files

Select the Advanced button (lower right side)

Select the entry for 'Edit Script' under the 'Actions' section

Select the 'Set Default' button (middle right side)

Select OK

Select Close

tiredodftry,

Thanks for posting this error message along with the solution.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Posted (edited)

whats wrong with it? who cares it just posts peoples scores

I can't run AutIt123 (read my previous posts here - if you find them) so I don't understand what is it about.

By me it should be in some new thread (topic) like "AutoIt123 scores",

so here we should read/post about things related to AutoIt123 and no scores.

In 30 pages it's very difficult to read something.

And pages will be increasing very quickly if we have almost 10000 registered users :think:

So this could at least be moved to such new topic...

Edited by Zedna
Posted

Typical posts in the AutoIt 1-2-3 topic.

How to use examiner?

Examiner.....

Examiner.....

Examiner.....

Examiner.....

{Huh}

Examiner.....

Examiner.....

Hey! where is my original post gone!....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Its three pages backwards.

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

:think:

Posted

I agree with the Examiner problem. Real pain to find anything useful in this topic.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

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