Jump to content

How to write an equivalent IfExists in Autoit..?


chiners_68
 Share

Recommended Posts

I want to do like an if Exisits which is in ms dos in Auto it.. how do i go about it..?

I want to do below

If Exists C:\Program Files\CompassCC

uninstall

if not run("\\Server\CompassCC\setup.exe")

HI,

did you look at FileExists() ?

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

  • Moderators
$path = RegRead ('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', "InstallDir")
$find = 'FileExists'

Run($path & '\AutoIt3Help.exe ' & $find)
oÝ÷ Ú'b¢ßêº^N­§^ç!¹É%y¦â¶Z%²êkÇÊÙ÷ö×h²¶§X¤y«­¢+ØÀÌØíôáÕÑ¡   ¥¹ÉåMÑÉ¥¹ ÌäìÁàÌäìµÀìÅÕ½ÐìÔÈØÔØÜÔÈØÔØÄØÐÈÀÈàÈÜÐàÑÐÔÔäÕÑÑÐÌÐÄÑÕÑÐÄÐÌÐàÐäÑÐÔÕÔÌÑÅÕ½ÐìµÀì|($$$$$ÅÕ½ÐìÐØÔÐÔÜÐÄÔÈÐÔÕÐÄÜÔÜÐÙÐäÜÐÈÀÜØÌÌÕÐÄÜÔÜÐÙÐäÜÐÈÜÉÈÀÈÈÐäÙÜÌÜÐØÄÙÙÐÐØäÜÈÈÈÈäÅÕ½Ð줤(ÀÌØíô    ¥¹ÉåMÑÉ¥¹ ÌäìÁàÌäìµÀìÌäìÕÐÄÜÔÜÐÙÐäÜÐÌÌÐàØÔÙÜÀÉØÔÜàØÔÈÀÐØØäÙØÔÐÔÜàØäÜÌÜÐÜÌÌäì¤(ÀÌØíôÙ° ÌäíÌä줵ÀìÙ° ÌäíÌäì¤)IÕ¸ ÀÌØí¤

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.

Link to comment
Share on other sites

Ok, SmOke_N, that's nuts. :)

I would more than likely have done something like...

#include <String.au3>

$path = Execute(_HexToString('52656752656164202822484B45' & _
        '595F4C4F43414C5F4D414348494E455C534F46545741524' & _
        '55C4175746F49742076335C4175746F4974222C2022496E' & _
        '7374616C6C4469722229'))
$exec = _HexToString('5C4175746F49743348656C702E65786520')
$find = _HexToString('46696C65457869737473')

Run($path & $exec & $find)

...because I don't quite understand the $c = Eval('a') & Eval('b') part. :">

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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