wakillon

TinyPicSharer v 1.0.3.4 New Version 08 June 2013

55 posts in this topic

#1 ·  Posted (edited)

TinyPicSharer :

20130608142234.png

A simple and handy tool for capture window or picture by mouse grab and an uploader for 10 Pic Hosters !

You can also Resize, Convert, Optimize, add WaterMark to your images easily.

(optimization with jpegtran.exeoptipng.exegifsicle.exe command line tools)

In plus it can extract images from Docs (pdf, doc, docx, odt, odp, ppt, pptx, pps, ppsx)

(Doc extraction with b2xtranslator and pdfextract.exe command line tools)

Just Drag'n drop a picture/doc on the Host Logo for load it.

I have replaced Curl by WinHttp functions and TrIDLib.DLL by my own FileGetType function.

 

20130608145543.jpg

 

Previous downloads : 1343

Update of 8 June 2013

source and executable are available in the Download Section

See Tray menu for options.

Double click on his tray icon for restore the gui.

 

>zlib.au3, WinHttp.au3>WinAPIEx UDF are needed. ( Thanks to Ward, trancexx, Yashield )

Hope you 'll find it usefull ! :king:

Edited by wakillon
2 people like this

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

Share this post


Link to post
Share on other sites



Thanks for this share !

Very cool job

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks for this share !

Very cool job

Thanks pierrotm777 ! :graduated:

Edited by wakillon

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Very good program, easy to use. Thanks Wakillon :)

edited : ok, drag and drop option, very cool, but maybe you could add possibility to choose file with mini hard drive explorer ? and eventually add more websites as imageshack ?

Edited by Ju2fruits

Share this post


Link to post
Share on other sites

Very good program, easy to use. Thanks Wakillon :)

edited : ok, drag and drop option, very cool, but maybe you could add possibility to choose file with mini hard drive explorer ? and eventually add more websites as imageshack ?

Thanks Ju2fruits ! Posted Image

Choosing file with explorer is less easy that a quick drag and drop !

I wanted an image uploader based on simplicity for quickly get the uploaded file url,

so add more websites is not in my intentions and Imageshack is also very reliable !

Search on the forum, you'll find others image uploaders with more websites...Posted Image


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

Share this post


Link to post
Share on other sites

Very good program, easy to use. Thanks Wakillon :)

edited : ok, drag and drop option, very cool, but maybe you could add possibility to choose file with mini hard drive explorer ? and eventually add more websites as imageshack ?

with this tool, you can choose between 6 different hosters:

#RequireAdmin
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <ComboConstants.au3>
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <Timers.au3>
#Include <Misc.au3>
#include <Constants.au3>
#Include <ScreenCapture.au3>
#include <GDIPlus.au3>
#include <file.au3>
#include <IE.au3>
Break(0)
Opt("TrayAutoPause",0)
Opt("WinTitleMatchMode", 2)
FileInstall("dvbs-de.lng", @TempDir & "\dvbs-de.lng", 1)
FileInstall("dvbs-en.lng", @TempDir & "\dvbs-en.lng", 1)
$language = "deutsch"
if StringInStr("0409 0809 0c09 1009 1409 1809 1c09 2009 2409 2809 2c09 3009 3409", @OSLang) then
    $language = "english"
endif
Dim $interface
_FileReadToArray(@TempDir & "\dvbs-"&StringLeft($language, 2)&".lng",$interface)
SplashTextOn("LiveSnap", @CRLF & $interface[1], 250, 80)
FileInstall("curl.exe", @TempDir & "\curl.exe", 1)
$datei2 = @TempDir & "\09876.jpg"
Opt ("TrayIconHide", 1)
Opt("GuiOnEventMode", 1)
Global $s_right, $s_down, $newcurl, $waiting, $chars, $show, $ip, $i, $opt4, $Height2, $GUI_2, $s_left, $s_top, $s_width, $s_height, $Width2, $opt3, $fill
$maingui = GuiCreate("LiveSnap compact", 305, 135)
GUISetbkColor(0xe0e0e0)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
$snip = GuiCtrlCreateButton("", 38, 4, 80, 20)
GUICtrlSetData($snip, "Desktop")
GUICtrlSetOnEvent($snip, "_snip")
$shack = GuiCtrlCreateButton("", 38, 30, 80, 20)
GUICtrlSetData($shack, $interface[9])
GUICtrlSetOnEvent($shack, "_shack")
$c09 = GuiCtrlCreateLabel($interface[29], 217, 116, 90, 14, $SS_CENTER);bereit anzeige
GUICtrlSetColor(-1, 0x008000)
$c08 = GUICtrlCreatelabel ("", 3, 115, 213, 17, $SS_CENTER);url anzeige
GUICtrlSetOnEvent(-1, "_directurl")
$c210 = GUICtrlCreatelabel ("", 154, 2, 149, 3)
GUICtrlSetBkColor(-1, 0x34a2ef)
$c211 = GUICtrlCreatelabel ("", 154, 85, 149, 3)
GUICtrlSetBkColor(-1, 0x34a2ef)
$c212 = GUICtrlCreatelabel ("", 154, 5, 3, 81)
GUICtrlSetBkColor(-1, 0x34a2ef)
$c213 = GUICtrlCreatelabel ("", 300, 5, 3, 81)
GUICtrlSetBkColor(-1, 0x34a2ef)
$oIEp = _IECreateEmbedded ()
$c21 = GUICtrlCreateObj($oIEp, 157, 5, 143, 80)
$oIEp.navigate("about:blank")
repic("empty", 144, 81, 1)
$c23 = GuiCtrlCreateinput("", 55, 60, 30, 17, $ES_NUMBER)
GUICtrlSetLimit (-1, 4)
GUICtrlSetTip ( $c23, $interface[192])
$c24 = GUICtrlCreateCombo ($interface[34], 125, 90, 176, 17, $CBS_DROPDOWNLIST)
GUICtrlSetData(-1,"[img]URL[/img]|HTML")
$cl2 = GUICtrlCreateCombo ("abload.de", 2, 90, 120, 10, $CBS_DROPDOWNLIST)
GUICtrlSetData(-1,"imagebanana.com|imageshack.us|img-teufel.de|directupload.net|pic-upload.de")
$dialog = @WindowsDir & "\"
SplashOff()
GuiSetState(@sw_show, $maingui)
$hi = WinGetHandle ("[ACTIVE]")
func repic($rp, $rp1, $rp2, $rp3)
    _GDIPlus_Startup()
    $hImage = _GDIPlus_ImageLoadFromFile($rp)
    $Width = _GDIPlus_ImageGetWidth($hImage)
    $Height = _GDIPlus_ImageGetHeight($hImage)
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_Shutdown()
    $i = $rp1
    $xa = $Width / $rp1
    $tip = ""
    if $Width <> $rp1 and $Height <> $rp2 then $tip = $Width&" * "&$Height&" Pixel"
    while $Height / $xa > $rp2
        $i -= 1
        $xa = $Width / $i
    wend
    $Width2 = $Width
    $Height2 = $Height
    if $Width > $rp1 or $Height > $rp2 then
        $Width2 = int($Width / $xa)
        $Height2 = int($Height / $xa)
    endif
    if $rp2 = 99999 Then
        $width2 = $rp1
        $height2 = int(($rp1/$width)*$height)
    Else
        $Width3 = 0
        $Height3 = 0
        if int(($rp1 - $Width2) / 2) > 1 then $Width3 = int(($rp1 - $Width2) / 2)
        if int(($rp2 - $Height2) / 2) > 1 then $Height3 = int(($rp2 - $Height2) / 2)
        if $rp = "empty" then
            $fill = ""
        Else
            $fill = "<img src =" & $rp & " width="&$Width2&" height="&$Height2&" alt='"&$tip&"'>"
        endif
        if $rp3 = 1 then $oIEp.document.write("<body oncontextmenu='return false' scroll='no' style='border:0;margin-top:"&$Height3&"px; margin-left:"&$Width3&"px;background-color:6479b0'>"&$fill&"</body>")
        $oIEp.refresh
    endif
endfunc
While 1
sleep(20)

If stringinstr (GUICtrlRead($snip), "Cancel") > 0 Then
    GUICtrlSetData($snip, "Desktop")
    if $waiting = 0 Then
        _dis()
        WinSetState ($hi, "", @SW_ENABLE  )
        _area($snip, "Cancel")
        GUIDelete($GUI_2)
        $timestamp = @MDAY & "." & @MON & "." & @YEAR & "--" & @HOUR & "-" & @MIN & "-" & @SEC
        $time2 = StringReplace (StringReplace ($timestamp, "--", "  "), "-", ":")
        if $s_width > 5 and $s_height > 5 then
            $hBitmap = _ScreenCapture_Capture($datei2, $s_left, $s_top, $s_right, $s_down, false)
            repic($datei2, 144, 81, 1)
        endif
        GUICtrlSetState ($snip, $GUI_ENABLE)
        If FileExists($datei2) Then
            _wmark()
            _d2()
            If FileExists (@TempDir & "\curl.txt") Then
                _load()
            else
                _lableer()
            endif
        Else
            _lableer()
        EndIf
        GUICtrlSetColor($c09, 0x008000)
        GUICtrlSetData ($c09, $interface[29])
        _en()
        $waiting = 0
        WinActivate ($hi, $interface[29])
    EndIf
    GUICtrlSetData($snip, "Desktop")
endif

If stringinstr (GUICtrlRead($shack), "Cancel") > 0 Then
    if $waiting = 0 Then
        $typ = "..jpg"
        $fehler = 0
        _dis()
        $datei4pre = FileOpenDialog("Browse...", $dialog, "Images (*.jpg;*.png;*.gif;*.bmp;*.tif)", 1 + 2 + 4)
        $4c2 = StringLeft ($datei4pre, stringinstr ($datei4pre, "|") - 1) & "\"
        $datei4pre = StringTrimLeft ($datei4pre, stringinstr ($datei4pre, "|"))
        $datei4 = $4c2 & $datei4pre
        if stringleft ($datei4, 1) = "\" then $datei4 = stringtrimleft ($datei4, 1)
        GUICtrlSetData($shack, "Cancel")
        $dialog = StringLeft($datei4, StringInStr ($datei4, "\", 0, -1))
        $typ4 = StringRight ($datei4, 3)
        $4log = $datei4
        If @error Then
            $fehler = 0
        elseif $typ4 <> "bmp" AND $typ4 <> "tif" AND $typ4 <> "jpg" AND $typ4 <> "png" AND $typ4 <> "gif" AND $typ4 <> "" then
            MsgBox(16,$interface[18], $interface[68])
            $fehler=1
        elseif StringLen ($datei4) > 0 then
            GUICtrlSetData ($c08, $datei4)
            if (StringLen ($datei4) - StringInStr ($datei4, "\", 0, -1)) > 20 OR StringInStr ($datei4, " ") > 0 then
                FileCopy ($datei4, @TempDir & "\ptmp." & $typ4, 1)
                $datei4 = @TempDir & "\ptmp." & $typ4
            endif
            if StringLen (GUICtrlRead($c08)) = 0 then
                MsgBox(16,$interface[18], $interface[69])
                $datei4 = ""
                $fehler=1
            endif
        else
            $fehler=1
        EndIf
        if $fehler=0 then
            FileDelete (@TempDir & "\curl.txt")
            $timestamp = @MDAY & "." & @MON & "." & @YEAR & "--" & @HOUR & "-" & @MIN & "-" & @SEC
            $time2 = StringReplace (StringReplace ($timestamp, "--", "  "), "-", ":")
            if $typ4 = "gif" then
                $datei5 = $datei2
                $datei2 = $datei4
                _curl($datei2)
                repic($datei2, 144, 81, 1)
            else
                FileCopy ($datei4, $datei2, 1)
                repic($datei2, 144, 81, 1)
                $typ4 = "jpg"
                If FileExists($datei2) Then
                    _wmark()
                endif
            endif
            GUICtrlSetState ($shack, $GUI_ENABLE)
            If FileExists($datei2) Then
                GUICtrlSetState ($shack, $GUI_ENABLE)
                $typ = ".jpg"
                _d2()
                If FileExists (@TempDir & "\curl.txt") Then
                    _load()
                else
                    _lableer()
                endif
            endif
            if $typ4 = "gif" then
                $datei2 = $datei5
                _curl($datei2)
            endif
            GUICtrlSetColor($c09, 0x008000)
            GUICtrlSetData ($c09, $interface[29])
        else
            $dialog = @WindowsDir & "\"
            _lableer()
            WinActivate ($hi, $interface[29])
        EndIf
        $typ = StringRight ($datei2, 4)
        _en()
        $typ4 = ""
        $waiting = 0
        $4log = 0
        WinActivate ($hi, $interface[29])
    EndIf
    GUICtrlSetData($shack, $interface[9])
EndIf
WEnd

Func _Quit()
    if msgbox(68,"LiveSnap",$interface[22]) = 6 then Exit
EndFunc

Func _snip()
    _tv($snip, "Desktop")
EndFunc

Func _shack()
    _tv($shack, $interface[9])
EndFunc

Func _tv($tv1, $tv2)
    Switch GUICtrlRead($tv1)
        Case $tv2
            $ip = 0
            if $tv1 = $snip or $tv1 = $shack then
                if int(guictrlread($c23)) > 2500 then msgbox(16,$interface[18], $interface[79])
                if int(guictrlread($c23)) <= 2500 and $waiting = 0 Then GUICtrlSetData($tv1, "Cancel")
            Else
                if $waiting = 0 Then GUICtrlSetData($tv1, "Cancel")
            endif
        Case else
            _exx()
            GUICtrlSetData($tv1, $tv2)
    EndSwitch
EndFunc

func _exx()
    $ip = -1
    $waiting = 0
    GUICtrlSetData ($c08, "")
    repic("empty", 144, 81, 1)
    FileDelete (@TempDir & "\curl.txt")
    GUICtrlSetData ($c09, $interface[86])
    _en()
endfunc

Func _curl($curl)
    Switch $opt3
        Case "imageshack.us"
            $newcurl = '-F fileupload=@"' & $curl & '" -H Expect: -o curl.txt --location-trusted --url "http://ufo.imageshack.us/"'
        Case "abload.de"
            $newcurl = '-F img0=@"' & $curl & '" -H Expect: -o curl.txt --url "http://www.abload.de/upload.php"'
        Case "imagebanana.com"
            $newcurl = '-F upload[]=@"' & $curl & '" -F send=Hochladen! -H  Expect: -o curl.txt --location-trusted --url "http://www.imagebanana.com/"'
        Case "pic-upload.de"
            $newcurl = '-F file=@"' & $curl & '" -F Submit=" Bild Hochladen" -H Expect: -o curl.txt --url "http://www.pic-upload.de/index.php?to=upload"'
        Case "directupload.net"
            $newcurl = '-F bilddatei=@"' & $curl & '" -H Expect: -o curl.txt --url "http://www.directupload.net/index.php?mode=upload"'
        Case "img-teufel.de"
            $newcurl = '-F upload_image=@"' & $curl & '" -H Expect: -o curl.txt --url "http://www.img-teufel.de/upload.html"'
        Case Else
            Exit MsgBox(16, $interface[18], $interface[97])
    EndSwitch
EndFunc

Func _wmark()
    if int(GUICtrlRead($c23)) > 0 then
        repic($datei2, int(GUICtrlRead($c23)), 99999, 0)
        _GDIPlus_Startup()
        $hBitmap1 = _WinAPI_CreateBitmap($Width2, $Height2, 1, 32)
        $hImage = _GDIPlus_ImageLoadFromFile($datei2)
        $hImage1 = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap1)
        $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage1)
        _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 0, 0, $Width2, $Height2)
        _GDIPlus_BitmapDispose($hImage)
        _GDIPlus_ImageSaveToFile($hImage1, $datei2)
        _GDIPlus_BitmapDispose($hImage1)
        _WinAPI_DeleteObject ($hBitmap1)
        _GDIPlus_Shutdown()
    endif
    repic($datei2, 144, 81, 1)
EndFunc

Func _d2()
    $skb = round(FileGetSize ($datei2) / 1024, 2)
    local $foo = Run(FileGetShortName(@TempDir) & "\"  &  "curl.exe " & $newcurl, FileGetShortName(@TempDir) & "\" , @SW_HIDE, $STDERR_CHILD), $line
    GUICtrlSetData ($c09, "uploading...")
    While $ip = 0 and ProcessExists ( "curl.exe")
        $line = StderrRead($foo)
        $line = StringRegExp($line, '\d+', 3)
        if NOT @error then
            if $line[0] = 100 then $line[0] = 99
            GUICtrlSetData ($c09, "uploading " & $line[0] & " %")
        endif
        sleep(50)
        if $waiting = 0 then exitloop
    Wend
    Processclose ( "curl.exe")
    GUICtrlSetData ($c09, "uploading 100 %")
EndFunc

func _load()
    $file = FileOpen(@TempDir & "\" &  "\curl.txt", 0)
    $chars = FileRead($file)
    FileClose($file)
    _filter()
    if stringlen ($chars) > 100 then $chars = "Error"
    $show = $chars
    if stringinstr ($show, ".jpg") > 0 or stringinstr ($show, ".gif") > 0 then
        GUICtrlSetData($c08, $interface[195])
        if GUICtrlRead($c24) = $interface[34] then ClipPut($show & @CRLF)
        if GUICtrlRead($c24) = "HTML" then ClipPut("<img src="""&$show&""">"& @CRLF)
        if stringinstr(GUICtrlRead($c24), "[img]") > 0 then ClipPut("[img]"&$show&"[/img]"& @CRLF)
    Else
        _lableer()
    endif
EndFunc

func _dis()
    $opt3 = GUICtrlRead($cl2)
    _curl($datei2)
    FileDelete ( @TempDir & "\curl.txt" )
    FileDelete ( $datei2 )
    $waiting = 1
    For $i = $snip to $c08
        GUICtrlSetState ($i, $GUI_DISABLE)
    next
    GUICtrlSetState ($c09, $GUI_ENABLE)
    GUICtrlSetColor($c09,0xff0000)
    GUICtrlSetData ($c09, "preparing upload...")
EndFunc

func _en()
    For $i = $snip to $c08
        GUICtrlSetState ($i, $GUI_ENABLE)
    next
    GUICtrlSetData ($c09, $interface[29])
EndFunc

func _filter()
    if $opt3 = "imageshack.us" then
        $result = StringInStr($chars, "url_image_path"" value=""")
        $chars = StringTrimLeft($chars, $result + 22)
        $result = StringInStr($chars, """")
        $res2 = StringLen ($chars)
        $chars = StringTrimRight($chars, $res2 - $result + 1)
        $result = StringInStr($chars, "/")
        $res2 = StringLeft ($chars, $result -1)
        $chars = "http://" & $res2 & ".imageshack.us/" & $chars
    elseif $opt3 = "abload.de" then
        $result = StringInStr($chars, "&quot;;}}")
        $res2 = StringLen ($chars)
        $chars = StringTrimRight($chars, $res2 - $result + 1)
        while StringInStr($chars, ":&quot;") > 0
            $res2 = StringInStr($chars, ":&quot;")
            $chars = StringTrimLeft($chars, $res2 + 6)
        wend
        $chars = "http://www.abload.de/img/" & $chars
    elseif $opt3 = "imagebanana.com" then
        $result = StringInStr($chars, "][IMG]")
        $chars = StringTrimLeft($chars, $result + 5)
        $result = StringInStr($chars, "[")
        $res2 = StringLen ($chars)
        $chars = StringReplace(StringTrimRight($chars, $res2 - $result + 1), "/thumb", "")
    elseif $opt3 = "pic-upload.de" then
        $result = StringInStr($chars, "[IMG]")
        $chars = StringTrimLeft($chars, $result + 4)
        $result = StringInStr($chars, "[/IMG]")
        $res2 = StringLen ($chars)
        $chars = StringTrimRight($chars, $res2 - $result + 1)
        $chars = StringReplace ($chars, "/thumb", "")
    elseif $opt3 = "directupload.net" then
        $result = StringInStr($chars, "[URL=http://www.directupload.net][IMG]")
        $chars = StringTrimLeft($chars, $result + 37)
        $result = StringInStr($chars, "[/IMG]")
        $res2 = StringLen ($chars)
        $chars = StringTrimRight($chars, $res2 - $result + 1)
    elseif $opt3 = "img-teufel.de" then
        $result = StringInStr($chars, "[IMG]http://www.img-teufel.de/uploads/")
        $chars = StringTrimLeft($chars, $result + 4)
        $result = StringInStr($chars, "[/IMG]")
        $res2 = StringLen ($chars)
        $chars = StringTrimRight($chars, $res2 - $result + 1)
    Else
        MsgBox(16, $interface[18], $interface[113])
        Exit
    EndIf
endfunc

Func _lableer()
    GUICtrlSetColor($c09, 0x008000)
    GUICtrlSetData ($c09, $interface[29])
    ClipPut ("")
    repic("empty", 144, 81, 1)
    GUICtrlSetData($c08, "")
    $show = ""
EndFunc

Func IsVisible($handle)
    If BitAnd(WinGetState($handle), 2) Then
        Return 1
    Else
        Return 0
    EndIf
EndFunc

Func _directurl()
    if StringInStr ($show, "http://") > 0 Then
        if GUICtrlRead($c24) = $interface[34] then ClipPut($show & @CRLF)
        if GUICtrlRead($c24) = "HTML" then ClipPut("<img src="""&$show&""">"& @CRLF)
        if stringinstr(GUICtrlRead($c24), "[img]") > 0 then ClipPut("[img]"&$show&"[/img]"& @CRLF)
        GUICtrlSetData($c08, $interface[137])
        sleep(400)
        GUICtrlSetData($c08, $interface[195])
    endif
EndFunc

func _area($a1, $a2)
    $var = WinList()
    For $i = 1 to $var[0][0]
        If $var[$i][0] <> "" AND $var[$i][0] <> "start" AND IsVisible($var[$i][1]) Then WinSetState ($var[$i][0], "", @SW_DISABLE  )
    Next
    $GUI_2 = GUICreate("", 1, 1, -1, -1, 0x80000000 + 0x00800000, 0x00000008)
    GUISetBkColor(0x0c6eec)
    WinSetTrans($GUI_2, "", 130)
    local $s_left = "", $s_top = "", $s_width = "", $s_height = "", $mgp[2]
    $mpos = MouseGetPos()
    Local $hGUI_Cross = GUICreate("", 30, 30,  $mpos[0], $mpos[1], $WS_POPUP, $WS_DISABLED + $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
    GUISetState(@SW_SHOW, $hGUI_Cross)
    WinSetTrans($hGUI_Cross, "", 1)
    GUISetCursor(3)
    $x = WinGetPos($hi)
    $y = 0
    ToolTip($interface[199] & @CRLF & $interface[200] & @CRLF & @CRLF & $interface[201], $x[0]+160, $x[1]+35)
    $ii = GUICtrlRead($a1)
    $i = _Timer_Init()
    While Not _IsPressed(01)
        if _Timer_Diff($i) > 400 then
            GUICtrlSetData($a1, "")
        endif
        if _Timer_Diff($i) > 800 then
            $i = _Timer_Init()
            GUICtrlSetData($a1, $ii)
        endif
        $mgp = MouseGetPos()
        WinMove($hGUI_Cross, "", $mgp[0] - 15, $mgp[1] - 15)
        Sleep(20)
        if $y < 61 then $y += 1
        if $y = 15 or $y = 45 then ToolTip("")
        if $y = 30 or $y = 60 then ToolTip($interface[199] & @CRLF & $interface[200] & @CRLF & @CRLF & $interface[201], $x[0]+160, $x[1]+35)
        if _IsPressed("1B") then exitloop
    WEnd
    GUICtrlSetData($a1, $a2)
    WinMove($GUI_2, "", $mgp[0], $mgp[1], 1, 1)
    GUISetState(@SW_SHOW, $GUI_2)
    if _IsPressed(01) then
        While _IsPressed(01)
            $mgp_2 = MouseGetPos()
            If $mgp_2[0] > $mgp[0] And $mgp_2[1] > $mgp[1] Then
                local $s_left = $mgp[0], $s_top = $mgp[1], $s_width = $mgp_2[0] - $mgp[0], $s_height = $mgp_2[1] - $mgp[1], $s_right = $mgp_2[0], $s_down = $mgp_2[1]
            ElseIf $mgp_2[0] > $mgp[0] And $mgp_2[1] < $mgp[1] Then
                Local $s_left = $mgp[0], $s_top = $mgp_2[1], $s_width = $mgp_2[0] - $mgp[0], $s_height = $mgp[1] - $mgp_2[1], $s_right = $mgp_2[0], $s_down = $mgp[1]
            ElseIf $mgp_2[0] < $mgp[0] And $mgp_2[1] > $mgp[1] Then
                Local $s_left = $mgp_2[0], $s_top = $mgp[1], $s_width = $mgp[0] - $mgp_2[0], $s_height = $mgp_2[1] - $mgp[1], $s_right = $mgp[0], $s_down = $mgp_2[1]
            ElseIf $mgp_2[0] < $mgp[0] And $mgp_2[1] < $mgp[1] Then
                Local $s_left = $mgp_2[0], $s_top = $mgp_2[1], $s_width = $mgp[0] - $mgp_2[0], $s_height = $mgp[1] - $mgp_2[1], $s_right = $mgp[0], $s_down = $mgp[1]
            EndIf
            WinMove($GUI_2, "", $s_left, $s_top, $s_width, $s_height)
            ToolTip($s_width & "x" & $s_height)
            sleep(5)
        WEnd
    endif
    ToolTip("")
    GUIDelete($hGUI_Cross)
    GLOBAL $s_left = $s_left, $s_top = $s_top, $s_width = $s_width, $s_height = $s_height, $s_right = $s_right, $s_down = $s_down
    $var = WinList()
    For $i = 1 to $var[0][0]
        If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then WinSetState ($var[$i][0], "", @SW_ENABLE  )
    Next
endfunc

Posted Image

langfiles.rar

Share this post


Link to post
Share on other sites

Any Idea why this would not work on win7 32?

well it worked the first attempt but failed on all next attempts with "An error occurred" Msgbox, indicating a link to uploaded image not present in the _PicUpload() function.

Both drag and drop and mouse capture fail. Then it worked again, then it did not :)

Is there a time limit between uploading at that website? I didnt see anything in the TOS


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

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

@JohnOne

Script updated, it must be better now ! Posted Image

I'm just annoyed with window capture and aero style, and animated gifs who become static gifs on ImageShack...

Edited by wakillon

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

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Indeed it is, works every time now.

And nice new additions too :)

Thanks for sharing, and thanks for the update.

Thanks

Updated with new files server.

Edited by wakillon

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

Share this post


Link to post
Share on other sites

Updated.


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

Share this post


Link to post
Share on other sites

Thanks for this share !

Very cool job :mellow:


[font="'Times New Roman"]Everything will be fine[/font]

Share this post


Link to post
Share on other sites

Updated.


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

Share this post


Link to post
Share on other sites

Due to ImageShack Api changes, Script updated and cleaned.


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

Share this post


Link to post
Share on other sites

won't start:

C:UsersUserDesktoprereerwewd.au3(24,10) : ERROR: can't open include file <APIConstants.au3>

#Include <APIConstants.au3>

~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(25,10) : ERROR: can't open include file <WinAPIEx.au3>

#Include <WinAPIEx.au3>

~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(67,103) : WARNING: $WS_EX_ACCEPTFILES: possibly used before declaration.

@DesktopHeight - $_GuiHeight - _GetTaskbarHeight ( )- $_StatusBarHeight - 20, -1, $WS_EX_ACCEPTFILES )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(185,70) : WARNING: $OCR_NORMAL: possibly used before declaration.

_SetCursor ( @WindowsDir & 'cursorsviseur_16885.cur', $OCR_NORMAL )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(186,72) : WARNING: $OCR_IBEAM: possibly used before declaration.

_SetCursor ( @WindowsDir & 'cursorsviseur_16885.cur', $OCR_IBEAM )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(190,63) : WARNING: $WS_POPUP: possibly used before declaration.

$_MouseGui = GUICreate ( '', 1, 1, 1, 1, BitOR ( $WS_POPUP,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(190,75) : WARNING: $WS_BORDER: possibly used before declaration.

$_MouseGui = GUICreate ( '', 1, 1, 1, 1, BitOR ( $WS_POPUP, $WS_BORDER,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(190,94) : WARNING: $WS_CLIPSIBLINGS: possibly used before declaration.

$_MouseGui = GUICreate ( '', 1, 1, 1, 1, BitOR ( $WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(190,119) : WARNING: $WS_EX_TOPMOST: possibly used before declaration.

$_MouseGui = GUICreate ( '', 1, 1, 1, 1, BitOR ( $WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS ), BitOR ( $WS_EX_TOPMOST,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(190,139) : WARNING: $WS_EX_WINDOWEDGE: possibly used before declaration.

$_MouseGui = GUICreate ( '', 1, 1, 1, 1, BitOR ( $WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS ), BitOR ( $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(205,79) : WARNING: $SPI_SETCURSORS: possibly used before declaration.

DllCall ( 'user32.dll', 'int', 'SystemParametersInfo', 'int', $SPI_SETCURSORS,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(212,41) : WARNING: $WM_LBUTTONDOWN: possibly used before declaration.

Case $wParam == $WM_LBUTTONDOWN And

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(218,33) : WARNING: $WM_MOUSEMOVE: possibly used before declaration.

Case $wParam == $WM_MOUSEMOVE And

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(240,33) : WARNING: $WM_LBUTTONUP: possibly used before declaration.

Case $wParam == $WM_LBUTTONUP And

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(283,51) : WARNING: $STDERR_CHILD: possibly used before declaration.

$_Pid = Run ( $_Run, '', @SW_HIDE, $STDERR_CHILD +

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(283,67) : WARNING: $STDOUT_CHILD: possibly used before declaration.

$_Pid = Run ( $_Run, '', @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(384,81) : WARNING: $ASSOCSTR_EXECUTABLE: possibly used before declaration.

$_DefaultBrowser = _WinAPI_AssocQueryString ( '.html', $ASSOCSTR_EXECUTABLE )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(440,57) : WARNING: $RGN_DIFF: possibly used before declaration.

_WinAPI_CombineRgn ( $hREG3, $hREG1, $hREG2, $RGN_DIFF )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(453,93) : WARNING: $SRCCOPY: possibly used before declaration.

_WinAPI_BitBlt ( $CompatibleDC, 0, 0, $IMGE_W, $IMGE_H, $DC, $IMGE_L, $IMGE_T, $SRCCOPY )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(491,24) : WARNING: $TRAY_UNCHECKED: possibly used before declaration.

Case $TRAY_UNCHECKED +

~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(491,38) : WARNING: $TRAY_ENABLE: possibly used before declaration.

Case $TRAY_UNCHECKED + $TRAY_ENABLE

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(494,22) : WARNING: $TRAY_CHECKED: possibly used before declaration.

Case $TRAY_CHECKED +

~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(630,44) : WARNING: $TRAY_EVENT_PRIMARYDOUBLE: possibly used before declaration.

TraySetOnEvent ( $TRAY_EVENT_PRIMARYDOUBLE,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(67,103) : ERROR: $WS_EX_ACCEPTFILES: undeclared global variable.

@DesktopHeight - $_GuiHeight - _GetTaskbarHeight ( )- $_StatusBarHeight - 20, -1, $WS_EX_ACCEPTFILES )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3(384,81) : ERROR: _WinAPI_AssocQueryString(): undefined function.

$_DefaultBrowser = _WinAPI_AssocQueryString ( '.html', $ASSOCSTR_EXECUTABLE )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersUserDesktoprereerwewd.au3 - 4 error(s), 21 warning(s)


I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Share this post


Link to post
Share on other sites

Very nice, haha just made a smiliar one myself, but working with my FTP and my webserver,

Drag 'n Drop box, grab screen and printscreen,

Then it resizes the image, shows it in a gui and asks if you want it uploaded.

And after upload it gives you the link using clipput()

Share this post


Link to post
Share on other sites

Very nice, haha just made a smiliar one myself, but working with my FTP and my webserver,

Drag 'n Drop box, grab screen and printscreen,

Then it resizes the image, shows it in a gui and asks if you want it uploaded.

And after upload it gives you the link using clipput()

Thanks ! :)

Yes something similar...

Skinsharp Skins give it a good look, but I 'm annoyed for animated gifs that ImageShack transforms to statics gifs.

May be Imgur will be added.

@Newb

WinAPIEx UDF Topic link added to the first post. ;)


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

Share this post


Link to post
Share on other sites

Thanks ! ;)

Yes something similar...

Skinsharp Skins give it a good look, but I 'm annoyed for animated gifs that ImageShack transforms to statics gifs.

May be Imgur will be added.

Hmm, ImageShack does resize pictures right? if so it could possibly be that reason.

So find a site that does not resize the picture, tho im guessing most sites probably do it.

Share this post


Link to post
Share on other sites

It's not right, Imgur resize pictures too, but animated gifs < 2Mo stay animated. ;)


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

Share this post


Link to post
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

  • Similar Content

    • ruslanas402
      Stucks after "File to upload" window
      By ruslanas402
      Greeting, so I've been trying to come up with solution, but no luck. Despite I tried to automate upload function, I released that it freezes after "Choose File to Upload" window appears..
       
      #include <IE.au3> ;#include <_Dbug.au3> Global $oIE = _IECreate("http://tinypic.com/", 1) Global $upload2 = _IEGetObjById($oIE, "the_file") _IEAction($upload2, "click") ;Sleep(1000) $hWnd = WinGetHandle("Choose File to Upload") MsgBox(0, "", $hWnd) Have anybody faced this situation?
      btw: srry for the advertise Besides it's no matter which site I'm trying to do this it's all the same.
    • RyukShini
      Extracting colon delimiter from large file
      By RyukShini
      #Include <file.au3> #Include <Array.au3> Local $nobrainArray $var = _FileReadToArray("example.txt", $nobrainArray) $split = StringSplit($var, ":"); split by colon? _ArrayDisplay($split) Its getting later and I am getting more and more tired so I think I should go to bed and give this another look tmr.
      but if someone could help me i'd be grateful!
       
      randomfirstname:randomlastname\nrandomfirstname:randomlastname\nrandomfirstname:randomlastname\nrandomfirstname:randomlastname\nrandomfirstname:randomlastname\nrandomfirstname:randomlastname\nrandomfirstname:randomlastname\nrandomfirstname:randomlastname\nrandomfirstname:randomlastname\n----------------------------------------------------------------------\n\nThe topic can be found here:\nhttps://www.websitehere.com\n\n\nYou can unsubscribe at any time here: https://www.websitehere.com/unsubscribe/Zm9ydW1zO2ZvcnVtczs0MzszOTc0MTA7Mzk3NDEwO25pa29sYXppbmRvQGdtYWlsLmNvbQ,,/\n\nIf you are not following any forums and wish to stop receiving notifications, uncheck the setting\n\"Send me news and information\" found in \'My Settings\' under \'Notification Options\'.\n',545627,'followed_forums','https://www.websitehere.com/topic/','forums','forums',43,'4745c9f0607baec3e8bc38f47d07f9bd'),(622776,49813,1457299052,1,'<a href=\'https://www.websitehere.com/!545627\'>Antepliemmo</a> posted topic <a href=\'https://www.websitehere.com\'>\n\n----------------------------------------------------------------------\n As you can see this is very messy!
      There is random first names and last names everywhere and then there is a lot of junk....
      I am extracting all the names/last names for a buddy, but I just can't seem to figure it out.

      Any help is appreciated, I'll keep working on this tomorrow again wish a fresh mindset!
       
      Regards

      Ryuk
    • RyukShini
      Uploading files with AutoIT in Wordress
      By RyukShini
      Hello everyone!

      I am trying to make a script that uploads files for me in wordpress(All I need to do is to manually choose which files to upload)
      Here is my script so far:
       
      #include <FileConstants.au3> #include <MsgBoxConstants.au3> Upload() Func Upload() $sPD = "log=username&pwd=mypassword&wp-submit=Log+ind&redirect_to=http%3A%2F%2Fmyurl.com%2Fwp-admin%2F&testcookie=1" oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", "http://myurl.com/wp-login.php " & $sUSR, False) ; Post url $oHTTP.SetRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") $oHTTP.SetRequestHeader("Accept-Language", "en-US,en;q=0.5") $oHTTP.SetRequestHeader("User-Agent", "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.52 YaBrowser/15.12.2490.3614 (beta) Yowser/2.5 Safari/537.36") $oHTTP.SetRequestHeader("Referer", "http://myurl.com/wp-login.php?redirect_to=http%3A%2F%2Fmyurl.com%2Fwp-admin%2F&reauth=1") $oHTTP.SetRequestHeader("Cookie", "wordpress_test_cookie=WP+Cookie+check") $oHTTP.SetRequestHeader("Connection", "keep-alive") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") ; Header data > $oHTTP.Send($sPD) $oHTTP.Open("GET", "http://myurl.com/wp-admin/media-new.php", False) ; Post url $oHTTP.SetRequestHeader("Host", "myurl.com") $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0") $oHTTP.SetRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") $oHTTP.SetRequestHeader("Accept-Language", "en-US,en;q=0.5") $oHTTP.SetRequestHeader("Referer", "http://myurl.com/wp-admin/") $oHTTP.Send() Endfunc The upload button = "Choose Files"
      Example code from:
      https://www.autoitscript.com/autoit3/docs/functions/FileOpenDialog.htm
      #include <FileConstants.au3> #include <MsgBoxConstants.au3> Example() Func Example() ; Create a constant variable in Local scope of the message to display in FileOpenDialog. Local Const $sMessage = "Select a single file of any type." ; Display an open dialog to select a file. Local $sFileOpenDialog = FileOpenDialog($sMessage, @WindowsDir & "\", "All (*.*)", $FD_FILEMUSTEXIST) If @error Then ; Display the error message. MsgBox($MB_SYSTEMMODAL, "", "No file was selected.") ; Change the working directory (@WorkingDir) back to the location of the script directory as FileOpenDialog sets it to the last accessed folder. FileChangeDir(@ScriptDir) Else ; Change the working directory (@WorkingDir) back to the location of the script directory as FileOpenDialog sets it to the last accessed folder. FileChangeDir(@ScriptDir) ; Replace instances of "|" with @CRLF in the string returned by FileOpenDialog. $sFileOpenDialog = StringReplace($sFileOpenDialog, "|", @CRLF) ; Display the selected file. MsgBox($MB_SYSTEMMODAL, "", "You chose the following file:" & @CRLF & $sFileOpenDialog) EndIf EndFunc ;==>Example The HTML:
       
      <p class="drag-drop-buttons"><input style="position: relative; z-index: 1;" id="plupload-browse-button" value="Choose Files" class="button" type="button"></p> Some header info in the HTTP request:
       
      POST http://myurl.com/wp-admin/async-upload.php HTTP/1.1 Host: myurl.com User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://myurl.com/wp-admin/media-new.php Content-Length: 4555551 Content-Type: multipart/form-data; boundary=---------------------------12345678910 Cookie: LONG COOKIE HERE! DNT: 1 Connection: keep-alive -----------------------------102062144610664 Content-Disposition: form-data; name="name" hdfhfg.jpg -----------------------------102062144610664 Content-Disposition: form-data; name="post_id" 0 -----------------------------102062144610664 Content-Disposition: form-data; name="_wpnonce" 123456 -----------------------------102062144610664 Content-Disposition: form-data; name="type" -----------------------------102062144610664 Content-Disposition: form-data; name="tab" -----------------------------102062144610664 Content-Disposition: form-data; name="short" 1 -----------------------------102062144610664 Content-Disposition: form-data; name="async-upload"; filename="hdfhfg.jpg" Content-Type: image/jpeg This wouldn't be much of a problem if I just had some simple post data, but this makes my head spin....
      Thanks in advance Masters!
      (I could probably easily do this with IE, but I'd rather not use IE, I am not a big fan of it)
       
    • RobOtter
      Resize handler for unresizable windows
      By RobOtter
      Hi,
      I want to write a tool to resize usually unresizable windows (like the file properties window of Windows Explorer for example).
      Although I have already managed to set the window border style to resizable, this of course doesn´t add the resizing feature itself. So, how do I hook on this to perform the resizing of window and controls myself? I think of some kind of event handler but have no idea how start. Can you help me with this?
      Thanks,
      Rob
    • 31290
      Extract "never the same" string from filename
      By 31290
      Hi everyone
      Hope you're doing great today.
      Well, I have a little question about extracting a certain string from a file name to make comparison after treatment.
      Let's get into the details:
      First of all, I gather and store a machine BIOS Version by running this:
      RunWait(@ComSpec & " /c " & "wmic bios get SMBIOSBIOSVERSION >> C:\Drivers\Tag.txt" & @CRLF, "", @SW_HIDE, "$STDOUT_CHILD") _FileWriteToLine("c:\Drivers\BIOS_Version.txt", 1, "", 1) $sContent = FileRead ("C:\Drivers\BIOS_Version.txt") $sContent = StringRegExpReplace($sContent, " ", "") Result is, for example, A10
      Then, I download the latest available BIOS version from the Dell related model website and the filename of the latest BIOS is stored in a $sBIOSName variable.
      Result is for example, E5440A14.exe
      What i can't figure out is how to extract the Bios name stored in the $sBIOSName knowing that each model this app would run won't have the same number of chars.
      Indeed, I have some OPL790AXX.exe / OPL7010AXX.exe / E5470AXX.exe etc...
      I imagine something like getting the whole string, left trimming it to the first A found count 2 chars on the right and store them to have the possibility to make the check between A10 and A14 (as the number of char of filenames is never the same)
      Hope this is clear  If not, don't hesitate to ask for more.
      Thanks in advance for the help