Jump to content

Recommended Posts

Posted

Hi 

JohnOne, Are you searching for a "" in script name ?
  Reveal hidden contents

 

Posted
  On 2/24/2015 at 7:10 PM, JohnOne said:
_MsgBox("Hello There World")

Func _MsgBox($msg, $title = StringMid(@ScriptName, StringInStr(@ScriptName, "\", 0, -1) + 1), $flag = 0)
    Return MsgBox($flag, $title, $msg)
EndFunc

 

May be like this no ?

_MsgBox("Hello There World")

Func _MsgBox($msg, $title = StringLeft ( @ScriptName, StringInStr ( @ScriptName, ".", 0, -1 ) - 1 ), $flag = 0)
    Return MsgBox($flag, $title, $msg)
EndFunc

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Posted (edited)
  On 2/24/2015 at 7:16 PM, kcvinu said:

 

Hi 

JohnOne, Are you searching for a "" in script name ?

 

Yes, the last one, and everything after that is the filename, whether is has dots, and with or without extension.

  On 2/24/2015 at 7:19 PM, wakillon said:

 

May be like this no ?

_MsgBox("Hello There World")

Func _MsgBox($msg, $title = StringLeft ( @ScriptName, StringInStr ( @ScriptName, ".", 0, -1 ) - 1 ), $flag = 0)
    Return MsgBox($flag, $title, $msg)
EndFunc

:) Same horse, different jockey.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted (edited)

stuff that may help more than the scriptname

$Clock = TimerInit()

For $i = 1 to 3
    _mbox ("Test Message String on line " & @ScriptLineNumber & " loop number " & $i)
    _mbox ("Test Message String on line " & @ScriptLineNumber & " loop number " & $i)
    _mbox ("Test Message String on line " & @ScriptLineNumber & " loop number " & $i)
Next



Func _mbox($msg)
msgbox(0,  TimerDiff($Clock) & "  Function on line " & @ScriptLineNumber , $msg)
EndFunc
Edited by boththose

  Reveal hidden contents

Posted (edited)

here an "unnerving" variant
it will disturb you till you will click OK

  Reveal hidden contents

_MsgBox()

Func _MsgBox($msg = "Pause", $title = StringMid(@ScriptName, StringInStr(@ScriptName, "\", 0, -1) + 1), $flag = 0, $out = 0)
    Do
        $out = MsgBox($flag, $title, $msg, 2)
    Until 1 = $out
    Return $out
EndFunc   ;==>_MsgBox
Edited by Chimp

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted (edited)

Hi 

Chimp, Ha ha... yes.. it is an unnerving... :) But it is blinking in each second.

Edited by kcvinu
  Reveal hidden contents

 

Posted

  On 2/24/2015 at 5:59 PM, kcvinu said:

 

@

Valuater, This is my fist step in the UDF world. I know, i need to learn more. Thanks for the suggestion. :)

 

@

gil900, Actually, This is the first time i met  _WinAPI_ShowMsg. I don't know anything about it.

 

I also - Not long ago I met this function.

I recommend you to read all the _WinAPI_* functions. It's like a new world.

It's a shame(I hope that "shame" is the correct word) that most of these functions are without examples.

Posted

Hഇ 

gil900, I will. I hope you can help me when i face an obstacle in this area. I mean _WinAPI_ functions. :)
  Reveal hidden contents

 

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
×
×
  • Create New...