Jump to content
rm4453

_IEFormElementSetValue Help!

Recommended Posts

rm4453

I am trying to get my code to be loopable based off of a variable count for example number of images selected variable is named $imgCount = 6 (meaning there were 6 images selected) I need to know if this will work assuming all images paths are stored in the gui created...

$image1

$image2

$image3

$image4

$image5

$image6

That would be the variable names that would equal the gui for guictrlread ....

$ImUploadCount = 0
$imageCounter = 6 ; has been set by incrementing every time an image was picked via gui button 1-6 we will assume it equals 6

Func Upload()

Do
$imUpload = $ImUploadCount + 1

_IEFormElementSetValue($browsefield, GUICtrlRead($Image & $imUpload))

Until $imageCounter = $imUpload

So Essentially will $Image & $imUpload provide $image1, $image2, $image3, etc... when it sets the value then uploads? or will that cause a problem...? "is there a better way to do this?

Share this post


Link to post
Share on other sites
Dgameman1
$ImUploadCount = 0
$imageCounter = 6 ; has been set by incrementing every time an image was picked via gui button 1-6 we will assume it equals 6

Func Upload()

Do
_IEFormElementSetValue($browsefield, GUICtrlRead($Image & $imUpload))
$ImUploadCount += 1
Until $imageCounter = $ImUploadCount

 

Share this post


Link to post
Share on other sites
rm4453
10 hours ago, Dgameman1 said:
$ImUploadCount = 0
$imageCounter = 6 ; has been set by incrementing every time an image was picked via gui button 1-6 we will assume it equals 6

Func Upload()

Do
_IEFormElementSetValue($browsefield, GUICtrlRead($Image & $imUpload))
$ImUploadCount += 1
Until $imageCounter = $ImUploadCount

 

Sweet Thanks... btw one more ? Would this work to grab the file path from a gui store it as a variable then put then upload the file on a webpage? I keep getting the error Browser security prevents SetValue of TYPE=FILE when I use _IEFormElemntSetValue so I am wondering if this would work to set the file....

 

$imUploadCount = 0
$ImageCounter = 6 ; This is set via buttons in gui based of of how many images are selected
            Do
                $imUpload = $imUploadCount + 1

                $oForm = _IEFormGetObjByName($ksl, "f-142")
                $oInputFile = _IEFormElementGetObjByName($oForm, "142")

                ; Assign input focus to the field and then send the text string
                _IEAction($oInputFile, "focus")
                _IEAction($oInputFile, "click")
                If $imUpload = 1 Then
                    Send(GUICtrlRead($Image1))
                ElseIf $imUpload = 2 Then
                    Send(GUICtrlRead($Image2))
                ElseIf $imUpload = 3 Then
                    Send(GUICtrlRead($Image3))
                ElseIf $imUpload = 4 Then
                    Send(GUICtrlRead($Image4))
                ElseIf $imUpload = 5 Then
                    Send(GUICtrlRead($Image5))
                ElseIf $imUpload = 6 Then
                    Send(GUICtrlRead($Image6))
                EndIf


                ;Find Image Description field!
                $descriptionimfield = _IEGetObjById($ksl, "d-142")
                If Not @error Then
                    ; MsgBox("Success", "Email Input Found", "Next Step!")
                Else
                    ;MsgBox("Failed", "Email Input Not Found", "Try Again!")
                    Exit
                EndIf


                ;Fill Image Description(s) field!
                If $imUpload = 1 Then
                    _IEFormElementSetValue($descriptionimfield, $Image1_Description)
                    If Not @error Then
                        ; MsgBox("Success", "Email Input Filled", "Next Step!")
                    Else
                        ;MsgBox("Failed", "Email Input Not Filled", "Try Again!")
                        Exit
                    EndIf
                ElseIf $imUpload = 2 Then
                    _IEFormElementSetValue($descriptionimfield, $Image2_Description)
                    If Not @error Then
                        ; MsgBox("Success", "Email Input Filled", "Next Step!")
                    Else
                        ;MsgBox("Failed", "Email Input Not Filled", "Try Again!")
                        Exit
                    EndIf
                ElseIf $imUpload = 3 Then
                    _IEFormElementSetValue($descriptionimfield, $Image3_Description)
                    If Not @error Then
                        ; MsgBox("Success", "Email Input Filled", "Next Step!")
                    Else
                        ;MsgBox("Failed", "Email Input Not Filled", "Try Again!")
                        Exit
                    EndIf
                ElseIf $imUpload = 4 Then
                    _IEFormElementSetValue($descriptionimfield, $Image4_Description)
                    If Not @error Then
                        ; MsgBox("Success", "Email Input Filled", "Next Step!")
                    Else
                        ;MsgBox("Failed", "Email Input Not Filled", "Try Again!")
                        Exit
                    EndIf
                ElseIf $imUpload = 5 Then
                    _IEFormElementSetValue($descriptionimfield, $Image5_Description)
                    If Not @error Then
                        ; MsgBox("Success", "Email Input Filled", "Next Step!")
                    Else
                        ;MsgBox("Failed", "Email Input Not Filled", "Try Again!")
                        Exit
                    EndIf
                ElseIf $imUpload = 6 Then
                    _IEFormElementSetValue($descriptionimfield, $Image6_Description)
                    If Not @error Then
                        ; MsgBox("Success", "Email Input Filled", "Next Step!")
                    Else
                        ;MsgBox("Failed", "Email Input Not Filled", "Try Again!")
                        Exit
                    EndIf
                EndIf


                ;Go to Next page!
                $oButtons = _IETagNameGetCollection($ksl, "input")
                For $oButton In $oButtons
                    If String($oButton.value) = "Upload File" Then
                        _IEAction($oButton, "click")
                        ;MsgBox("Success", "Login Successful!", "Login Credentials Verified!")
                        ExitLoop
                    Else
                    EndIf
                Next
                Sleep(2000)
            Until $imUpload = $ImageCounter

 

Here Is The Form Code i am Trying To Use IT On In IE

<DIV id=bodyCol1 sizcache06735652359028728="138" sizset="0"><DIV style="WIDTH: 424px; FLOAT: left; MARGIN: 0px 0px 10px">
<STYLE type=text/css>.announcement_box {
    FONT-SIZE: 14px; WIDTH: 615px; BACKGROUND: #eee; FLOAT: left; FONT-WEIGHT: bold; PADDING-BOTTOM: 10px; PADDING-TOP: 10px; PADDING-LEFT: 10px; CLEAR: left; MARGIN: 0px 0px 20px; PADDING-RIGHT: 10px
}
.announcement_box A {
    TEXT-DECORATION: none
}
</STYLE>

<DIV class=announcement_box><FONT color=#aa0000>UPDATE:</FONT> Services is now part of <A href="http://local.ksl.com/?s_cid=services">KSL Local</A> with more categories and added features.<BR>To take full advantage of KSL Local be sure to <A href="http://local.ksl.com/merchant/locations">add your business</A> today. Service ads posted outside of KSL Local will be deleted.<BR></DIV>
<DIV style="CLEAR: both"></DIV></DIV>
<DIV style="WIDTH: 424px; FLOAT: left; MARGIN: 0px 0px 10px"><!-- Hack -->
<SCRIPT type=text/javascript>
 $(document).ready( function() {
 $('#3').attr('disabled', 'disabled');
 $('#4').attr('disabled', 'disabled');
 $('.element:eq(3)').append(
 ' <a href="index.php?nid=1126">Change »</a>'
 );
 $('.element:eq(4)').append(
 ' <a href="index.php?nid=1126">Change »</a>'
 );
 } );
</SCRIPT>
</DIV>
<DIV id=bodyCol2><!-- ===================[ STORY PAGES ]================= --><!-- ===================[ STORY MEDIA ]================= --><!-- ===================[ STORY RELATED ]================= --><!-- ===================[ STORY RELATED ]================= --><!-- ===================[ STORY GALLERIES ]================= --></DIV>
<SCRIPT language=JavaScript type=text/javascript>
function addInputs()
{
    var oNewNode = document.createElement("div");
    oNewNode.setAttribute("style","padding-top: 5px;");
    document.getElementById('attr_fields').appendChild(oNewNode);
    oNewNode.innerHTML="<input type=\"text\" name=\"text[]\" id=\"text[]\" size=\"25\" \/>";
//      document.getElementById('attr_fields').innerHTML="<input type=\"text\" name=\"text[]\" id=\"text[]\" size=\"25\" \/>";
}

var mediaCount = 0;

// ================================================================
function addMedia(ctrlID,divID,inputName,limit)
{
    var name = "media_"+mediaCount;
    var oNewNode = document.createElement("div");

    oNewNode.setAttribute("style","padding-top: 3px;");
    oNewNode.setAttribute("id",name);
    document.getElementById(divID).appendChild(oNewNode);
    oNewNode.innerHTML="<input name=\""+inputName+"[]\" type=\"file\" /> <a href=\"#\" onClick=\"delMedia('"+ctrlID+"','"+name+"')\">Remove</a>";

    mediaCount++;

    if (document.getElementById(divID).childNodes.length >= limit) {
        document.getElementById(ctrlID).style.display = "none";
    }
    //      document.getElementById('attr_fields').innerHTML="<input type=\"text\" name=\"text[]\" id=\"text[]\" size=\"25\" \/>";
}
// ================================================================
function delMedia(ctrlID,name)
{
    var oNode = document.getElementById(name);
    oNode.parentNode.removeChild(oNode);

    mediaCount--;
    document.getElementById(ctrlID).style.display = "block";
}

var subName;

// ================================================================
function setCat(cName,sName,col,tId)
{
    var sNode = document.getElementById(sName);
    var cIndex = document.getElementById(cName).selectedIndex;
    var cValue = document.getElementById(cName).options[cIndex].value;

    //alert(cValue);

    //sNode.style.background = "#ddd";
    sNode.options[1] = new Option("[Loading Options]", "", false, false);
    sNode[1].selected = true;

    subName = sName;
    $('#throbber-'+subName).css('display','inline');

    //document.getElementById("rmiCmd").src = "/scripts/cat_options.php?col="+col+"&tid="+tId+"&nid="+cValue;
    $.get('/scripts/cat_options2.php', { col: col, tid: tId, nid: cValue }, setSub2, 'json');
}
// ================================================================
function setSub2(d) {
    var sub = $('#'+subName);
    $('#throbber-'+subName).css('display','none');

    if(d.result == 'error') return;

    //sub.css('background-color','#ffffff');
    sub.empty();

    sub.append('<option value="">Select a Sub-Category</option>');
    for(i in d.categories) {
        var v = d.categories[i].split('|');
        sub.append('<option value='+v[0]+'>'+v[1]+'</option>');
    }
}
// ================================================================
function setSub(doc) {
    var sNode = document.getElementById(subName);
    var rmiData = doc.getElementById('rmiData').innerHTML;
    var aItems = rmiData.split("|");
    var aVals;

    sNode.style.background = "#fff";

    //var tNode = document.getElementById("id_text");
    //tNode.value = rmiData;

    for (var x = 0; x < (aItems.length -1); x ++) {
        aVals = aItems[x].split("=");
        sNode.options[x+1] = new Option(aVals[1],aVals[0],false,false);
    }

    sNode.length = x+1;
    sNode[0].selected = true;
}
// ================================================================
function start_upload(id)
{
    $('#d-'+id).css('background-color', '#ccc');
    $('.throbber').css('display', 'inline');
}
// ================================================================
function stop_upload(id, src, desc, alt)
{
    var html = '';
    var idx = $('#u-'+id+' div.photo').length;

    if(src == false) {
        alert("Error: "+desc);
    }
    else {
        html = '<div class="photo"><div class="operations"><button class="photo-up" onclick="photo_up(this)">Move up</button> <button class="photo-down" onclick="photo_down(this)">Move down</button> <button class="photo-delete" onclick="photo_delete(this)">Delete</button></div><img class="thumbnail" src="'+src+'?filter=ksl/newhl"><div class="title"><span class="title-prefix">Photo:</span> '+alt+'</div><div><span class="title-prefix">Description:</span> <span class="description">'+desc+'</span></div><div><button class="photo-edit" onclick="photo_edit_description(this)">Edit description</button></div></div>';
        $('#u-'+id).append(html);
    }

    // clear the form
    $('#d-'+id).css('background-color', 'white');
    $('#f-'+id).get(0).reset();
    $('.throbber').css('display', 'none');
}
// ================================================================
function photo_up(e)
{
    var src = $(e).parent().parent();
    var dst = $(src.prev());

    if(dst.length == 0)
        return;

    var srcidx = src.prevAll().length;
    var dstidx = srcidx-1;

    // perform API call
    $.post('/resources/form/airlock_api.php',
            { cmd: 'move_media', source: 'airlock', aid: '71621910', from: srcidx, to: dstidx },
            function (d) {
                if(d.result != 'success')
                    return;

                $(src).insertBefore(dst);
            },
            'json'
    );
}
// ================================================================
function photo_down(e)
{
    var src = $(e).parent().parent();
    var dst = $(src.next());

    if(dst.length == 0)
        return;

    var srcidx = src.prevAll().length;
    var dstidx = srcidx+1;

    // perform API call
    $.post('/resources/form/airlock_api.php',
            { cmd: 'move_media', source: 'airlock', aid: '71621910', from: srcidx, to: dstidx },
            function (d) {
                if(d.result != 'success')
                    return;

                $(src).insertAfter(dst);
            },
            'json'
    );
}
// ================================================================
function photo_delete(e)
{
    var src = $(e).parent().parent();
    var index = src.prevAll().length;

    // perform API call
    $.post('/resources/form/airlock_api.php',
            { cmd: 'delete_media', source: 'airlock', aid: '71621910', index: index },
            function (d) {
                if(d.result != 'success')
                    return;

                src.remove();
            },
            'json'
    );
}
// ================================================================
function photo_edit_description(e)
{
    var src = $(e).parent().parent();
    var index = src.prevAll().length;

    var desc = src.find('.description');
    var odesc = desc.text();
    var ndesc = prompt('Please enter the description for the photo:', odesc);

    if(ndesc == null)
        return;

    // perform API call
    $.post('/resources/form/airlock_api.php',
            { cmd: 'edit_media', source: 'airlock', aid: '71621910', index: index, desc: ndesc },
            function (d) {
                if(d.result != 'success')
                    return;

                desc.text(ndesc);
            },
            'json'
    );
}
// ================================================================
function supports_html5_storage()
{
    try {
        return 'localStorage' in window && window['localStorage'] !== null;
    } catch (e) {
        return false;
    }
}
// ================================================================
function send_id()
{
    //20110427 - BH
    //this causes double posting in the classifieds, as it resubmits anything in the airlock a second time.

    return;

    var id;

    if(!supports_html5_storage())
        return;

    id = localStorage.getItem('ddmId');
    if(id == null) {
        id = Math.round(Math.random()*10000000);
        localStorage.setItem('ddmId', id);
    }

    $.post('/resources/form/airlock_api.php',
           { cmd: 'set_id', source: 'airlock', aid: '71621910', id: id},
           function(){},
           'json'
          );
}
// ================================================================
$(document).ready(function(){
    send_id();
});
</SCRIPT>

<STYLE type=text/css>.barBox {
    FONT-SIZE: 14px; HEIGHT: 21px; BORDER-RIGHT: #000 1px solid; WIDTH: 620px; FONT-WEIGHT: normal; COLOR: #fff; TEXT-ALIGN: center; MARGIN-LEFT: 0px; CLEAR: left; BORDER-LEFT: #000 1px solid
}
.bar1 {
    HEIGHT: 21px; BACKGROUND: url(/images/barBackRed.gif) no-repeat right top; FLOAT: left
}
.bar2 {
    HEIGHT: 21px; BACKGROUND: url(/images/barFrontRed.gif) no-repeat right top; FLOAT: left
}
.bar3 {
    HEIGHT: 21px; BACKGROUND: url(/images/barBackGrey.gif) no-repeat right top; FLOAT: left
}
.bar4 {
    HEIGHT: 21px; BACKGROUND: url(/images/barBackGrey.gif) no-repeat left top; FLOAT: left
}
.bar5 {
    HEIGHT: 21px; BACKGROUND: url(/images/barFrontRed.gif) no-repeat left top; FLOAT: left
}
.barLabels {
    FONT-SIZE: 12px; HEIGHT: 21px; WIDTH: 332px; FONT-WEIGHT: bold; COLOR: #666; TEXT-ALIGN: center; PADDING-TOP: 5px; MARGIN-LEFT: 10px; CLEAR: left
}
.barBottom {
    HEIGHT: 40px; FLOAT: left; TEXT-ALIGN: left
}
.barText {
    POSITION: relative; LEFT: -6px; TOP: 4px
}
.formDivider {
    FONT-SIZE: 14px; MARGIN-BOTTOM: 15px; BORDER-TOP: #ccc 1px solid; HEIGHT: 20px; WIDTH: 620px; BACKGROUND: #eeeeee; MARGIN-TOP: 10px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; PADDING-TOP: 3px; PADDING-LEFT: 7px; CLEAR: left; PADDING-RIGHT: 0px
}
.imageBox {
    MARGIN-BOTTOM: 5px; MARGIN-TOP: 5px; FLOAT: left; MARGIN-RIGHT: 10px
}
.help {
    FONT-SIZE: 10px
}
.boxOk {
    MARGIN-TOP: 4px
}
.boxErr {
    BORDER-TOP: #900 1px solid; BORDER-RIGHT: #900 1px solid; BACKGROUND: #fbb; MARGIN-TOP: 4px; BORDER-BOTTOM: #900 1px solid; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; PADDING-LEFT: 2px; BORDER-LEFT: #900 1px solid; PADDING-RIGHT: 2px
}
.boxStatic {
    FONT-SIZE: 14px; MARGIN-TOP: 4px; FONT-WEIGHT: bold
}
.optionBox {
    MARGIN-BOTTOM: 8px; MARGIN-TOP: 3px
}
.submitBox {
    CLEAR: both; MARGIN: 5px 0px 0px 2px
}
.element {
    MARGIN-BOTTOM: 3px; WIDTH: 585px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; CLEAR: left; PADDING-RIGHT: 0px
}
.elementFloat {
    MARGIN-BOTTOM: 4px; FLOAT: left; MARGIN-RIGHT: 10px
}
.iLabel {
    FONT-SIZE: 12px; WIDTH: 120px; FLOAT: left; FONT-WEIGHT: normal; PADDING-BOTTOM: 0px; TEXT-ALIGN: left; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 4px 0px 0px 5px; DISPLAY: block; PADDING-RIGHT: 0px
}
.gBox {
    OVERFLOW: hidden; WIDTH: 625px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px 0px 15px; PADDING-RIGHT: 0px
}
.gTitle {
    FONT-SIZE: 18px; BORDER-TOP: #ccc 1px solid; WIDTH: 620px; FONT-WEIGHT: bold; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 0px; MARGIN: 0px 0px 12px; PADDING-RIGHT: 0px
}
.gBody {
    WIDTH: 590px; PADDING-BOTTOM: 5px; PADDING-TOP: 0px; PADDING-LEFT: 20px; PADDING-RIGHT: 15px
}
IFRAME.uploader {
    HEIGHT: 0px; WIDTH: 0px; DISPLAY: none
}
.photos {
    MARGIN-LEFT: 5px; CLEAR: both
}
.operations {
    FLOAT: right
}
.operations SPAN {
    COLOR: blue
}
.photos DIV.photo {
    MARGIN-BOTTOM: 8px; HEIGHT: 77px; BORDER-BOTTOM: #ccc 1px dashed; PADDING-BOTTOM: 9px; PADDING-TOP: 2px; MIN-HEIGHT: 77px
}
.photos INPUT {
    FONT-SIZE: 10px
}
.photos IMG {
    FLOAT: left; MARGIN-RIGHT: 10px
}
.photos .title-prefix {
    FONT-WEIGHT: bold
}
.photos BUTTON {
    FONT-SIZE: 80%; BORDER-TOP: #aaa 1px solid; BORDER-RIGHT: #aaa 1px solid; BORDER-BOTTOM: #aaa 1px solid; BORDER-LEFT: #aaa 1px solid; BACKGROUND-COLOR: #e6e6e6; -webkit-border-radius: 3px; -moz-border-radius: 3px
}
.photos BUTTON:hover {
    BORDER-TOP: #0073ea 1px solid; BORDER-RIGHT: #0073ea 1px solid; BORDER-BOTTOM: #0073ea 1px solid; COLOR: white; BORDER-LEFT: #0073ea 1px solid; BACKGROUND-COLOR: #0073ea
}
.photos BUTTON.photo-edit {
    MARGIN-TOP: 3px
}
.photos .thumbnail {
    HEIGHT: 75px; WIDTH: 100px
}
.throbber {
    DISPLAY: none
}
#HomeDetails {
    DISPLAY: none
}
</STYLE>

<DIV style="CLEAR: both"></DIV>
<DIV class=gBox sizcache06735652359028728="138" sizset="0">
<DIV style="FONT-SIZE: 14px; FLOAT: left; FONT-WEIGHT: bold; COLOR: #777; MARGIN: 0px 0px 2px">KSL Classifieds - Utah's Fastest Growing Classifieds Website</DIV>
<DIV style="FONT-SIZE: 20px; FONT-WEIGHT: bold; CLEAR: left; MARGIN: 0px 0px 10px">Place a FREE Classified Ad</DIV>
<DIV style="MARGIN: 0px 0px 10px">
<DIV class=barBox>
<DIV class=bar1 style="WIDTH: 137px"><SPAN class=barText><SPAN style="FONT-SIZE: 11px">Create the Ad</SPAN></SPAN></DIV>
<DIV class=bar1 style="WIDTH: 124px"><SPAN class=barText><SPAN style="FONT-SIZE: 11px">Contact Info</SPAN></SPAN></DIV>
<DIV class=bar2 style="WIDTH: 124px"><SPAN class=barText><SPAN style="FONT-SIZE: 11px">Add Photos</SPAN></SPAN></DIV>
<DIV class=bar3 style="WIDTH: 124px"><SPAN class=barText><SPAN style="FONT-SIZE: 11px">Terms of Use</SPAN></SPAN></DIV>
<DIV class=bar4 style="WIDTH: 111px"><SPAN class=barText><SPAN style="FONT-SIZE: 11px">Thank You</SPAN></SPAN></DIV></DIV></DIV>
<DIV>
<DIV class=gBody></DIV></DIV>
<DIV id=PhotoUpload>
<DIV class=gTitle>Photo Upload</DIV>
<DIV class=gBody id=PhotoUpload>
<DIV class=element>
<P><B>Note:</B> The first photo will be used as the primary photo and will represent your ad in the listings, so make sure it's the best photo you have. Use the buttons to the right of each image to change the ordering. </P><BR></DIV>
<DIV class=element>
<DIV class=photos id=u-142></DIV>
<FORM id=f-142 onsubmit=start_upload(142) action=/resources/form/upload.php encType=multipart/form-data method=post target=i-142 jQuery170540162545780766="5"><INPUT name=nid type=hidden value=640> <INPUT name=sid type=hidden value=4516794> <INPUT name=fid type=hidden value=563456> <INPUT name=source type=hidden value=airlock> <INPUT name=aid type=hidden value=71621910> <LABEL class=iLabel for=142>File:</LABEL> <INPUT name=MAX_FILE_SIZE type=hidden value=10000000> <INPUT name=142 class=boxOk id=142 type=file><BR></DIV></FORM>
<FORM id=f-142 onsubmit=start_upload(142) action=/resources/form/upload.php encType=multipart/form-data method=post target=i-142 jQuery170540162545780766="5">
<DIV class=element><LABEL class=iLabel for=d-142>Description:</LABEL> <TEXTAREA name=d-142 class=boxOk id=d-142 style="HEIGHT: 50px; WIDTH: 400px; BACKGROUND-COLOR: white" wrap=soft></TEXTAREA> </DIV>
<DIV class=element><LABEL class=iLabel for=s-142></LABEL><INPUT name=s-142 id=s-142 type=submit value="Upload file"> <IMG width=16 height=16 class=throbber style="DISPLAY: none" src="/graphics/throbber.gif"> <BR><IFRAME name=i-142 class=uploader id=i-142 src="">
                </IFRAME></FORM>
<SCRIPT type=text/javascript>
                //$(document).ready(function () {
                    $('#f-142').submit(function () { $('#f-142').attr('target','i-142'); });
                //});
                </SCRIPT>
 <A href="index.php?nid=1126">Change »</A></DIV></DIV></DIV>
<DIV id=PhotoTips sizcache06735652359028728="138" sizset="0">
<DIV class=gTitle>Photo Tips</DIV>
<DIV class=gBody id=PhotoTips sizcache06735652359028728="138" sizset="0">
<DIV class=element sizcache06735652359028728="138" sizset="0">
<DIV style="PADDING-BOTTOM: 7px; PADDING-LEFT: 15px" sizcache06735652359028728="138" sizset="0">
<LI>Submitted images must be in JPG or GIF format.</LI>
<LI>Although all submitted images will automatically be resized to <SPAN style="FONT-WEIGHT: bold">640x480</SPAN> pixels, we recommend resizing your images to these dimensions before you upload them to avoid any potential problems. Click <A href="http://www.ksl.com/?nid=391&amp;sid=651805" target=_new>HERE</A> for instructions on how to do this.</LI>
<LI>If resizing your images, as recommended above, does not help, then try submitting the ad with no images and then add the rest later using the edit function in "My Ads".</LI></DIV> <A href="index.php?nid=1126">Change »</A></DIV></DIV></DIV></DIV>
<FORM action=/index.php?nid=640&amp;form_3=16&amp;form_4=467 encType=multipart/form-data method=post><INPUT name=nid type=hidden value=640> <INPUT name=sid type=hidden value=4516794> <INPUT name=fid type=hidden value=563456> 
<DIV class=submitBox><INPUT name=back class=submitBox type=submit value="<< Back Page"> <INPUT name=next class=submitBox type=submit value="Next Page >>"> </DIV></FORM>
<STYLE type=text/css>.mediaright {
    MARGIN-BOTTOM: 3px; WIDTH: 202px; FLOAT: right; MARGIN-LEFT: 15px
}
.medialeft {
    MARGIN-BOTTOM: 3px; WIDTH: 202px; FLOAT: left; MARGIN-RIGHT: 30px
}
.sidebarright {
    FONT-SIZE: 12px; WIDTH: 180px; BORDER-BOTTOM: #ccc 1px solid; FLOAT: right; COLOR: #000; PADDING-BOTTOM: 7px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px 0px 10px 10px; PADDING-RIGHT: 0px
}
.sidebarleft {
    FONT-SIZE: 12px; WIDTH: 180px; BORDER-BOTTOM: #ccc 1px solid; FLOAT: left; COLOR: #000; PADDING-BOTTOM: 7px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px 10px 10px 0px; PADDING-RIGHT: 0px
}
.sidebarleft UL {
    PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 30px; MARGIN: 0px; PADDING-RIGHT: 0px
}
.sidebarright UL {
    PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 30px; MARGIN: 0px; PADDING-RIGHT: 0px
}
.divboxleft {
    FONT-SIZE: 12px; MARGIN-BOTTOM: 3px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid; WIDTH: 202px; BORDER-BOTTOM: black 1px solid; FLOAT: left; PADDING-BOTTOM: 6px; PADDING-TOP: 6px; PADDING-LEFT: 6px; BORDER-LEFT: black 1px solid; PADDING-RIGHT: 6px; MARGIN-RIGHT: 15px
}
.divboxright {
    FONT-SIZE: 12px; MARGIN-BOTTOM: 3px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid; WIDTH: 202px; BORDER-BOTTOM: black 1px solid; FLOAT: right; PADDING-BOTTOM: 6px; PADDING-TOP: 6px; PADDING-LEFT: 6px; MARGIN-LEFT: 15px; BORDER-LEFT: black 1px solid; PADDING-RIGHT: 6px
}
.divboxleft UL {
    OVERFLOW: auto; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 15px; MARGIN: 0px 0px 0px 10px; PADDING-RIGHT: 0px
}
.divboxright UL {
    OVERFLOW: auto; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 15px; MARGIN: 0px 0px 0px 10px; PADDING-RIGHT: 0px
}
.divboxleft FONT {
    FONT-SIZE: 11px
}
.divboxright FONT {
    FONT-SIZE: 11px
}
.ksltableleft {
    FONT-SIZE: 11px; MARGIN-BOTTOM: 10px; MARGIN-TOP: 5px; FLOAT: left; MARGIN-RIGHT: 15px
}
.ksltableright {
    FONT-SIZE: 11px; MARGIN-BOTTOM: 10px; MARGIN-TOP: 5px; FLOAT: right; MARGIN-LEFT: 15px
}
.ksltable {
    BORDER-COLLAPSE: collapse
}
.ksltable TD {
    FONT-SIZE: 11px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-BOTTOM: black 1px solid; PADDING-BOTTOM: 2px; TEXT-ALIGN: center; PADDING-TOP: 3px; PADDING-LEFT: 7px; BORDER-LEFT: black 1px solid; PADDING-RIGHT: 7px
}
.ksltable TH {
    FONT-SIZE: 11px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-BOTTOM: black 1px solid; PADDING-BOTTOM: 2px; TEXT-ALIGN: center; PADDING-TOP: 3px; PADDING-LEFT: 7px; BORDER-LEFT: black 1px solid; PADDING-RIGHT: 7px
}
.ksltable TH {
    FONT-SIZE: 12px; FONT-WEIGHT: bold; COLOR: #fff; PADDING-BOTTOM: 4px; TEXT-ALIGN: center; PADDING-TOP: 5px; BACKGROUND-COLOR: #0b162f
}
SPAN#widgetclose:hover {
    CURSOR: pointer
}
</STYLE>
<!-- ===================[ STORY HEAD : INTRO ]================= -->
<DIV id=storyIntro></DIV><!-- HERE HERE --><!-- Google Analytics -->
<SCRIPT>
  (function(i,s,o,g,r,a,m){ i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-70949446-4', 'auto');
  ga('send', 'pageview');

</SCRIPT>
</DIV>

 

Edited by rm4453
Added Code For Webpage Form I am Trying It on.

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

    • JuanFelipe
      By JuanFelipe
      Hello friends, I would like to know how to open a GUI from another GUI, I did it the way I leave the attached code, but when closing the second GUI they all close, they could help me to solve this problem without compiling another script. Thank you #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 173, 126, 192, 124) $Button1 = GUICtrlCreateButton("Button1", 16, 24, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _form2() EndSwitch WEnd ;================================================= GUI 2 Func _form2() $Form1 = GUICreate("Form2", 615, 437, 192, 124) GUISetState(@SW_SHOW) While 2 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc  
    • FMS
      By FMS
      Hello,
      I try to get all the text from a news site around a subject.
      The first run I get all the text inside a attribute in an array.
      When i try to go back and reload another page it chrashes and think it because "$oIE.GoBack"
      I couldn't find anything in the help/forum around this subject.
      Do I need to reload the $oIE or something afther an X.GoBack?
      The error i got is :
      if $oTag2.GetAttribute("class") == "NewsDetail" Then if $oTag2^ ERROR I'm not shure why I got this error, maybe someone could explain?
      Also I'm open for some pointers in this test script because I'm pretty new in working whit the IE.UDF
      Maybe there is an simpler way to get the same results?

      test script:
      #include <IE.au3> #include <MsgBoxConstants.au3> #include <Array.au3> HotKeySet("{ESC}", "Terminate") Global $oIE = _IECreate("https://www.iex.nl/Zoeken/Nieuws.aspx?q=air%20france") ;get first subject Global $oLink1 = _IEGetObjById($oIE, "ctl00_ctl00_Content_LeftContent_NewsSearch_repNews_ctl00_linkNews") Sleep(500) _IEAction($oLink1, "click") Sleep(500) Global $oTags = _IETagNameGetCollection($oIE, "div") Global $aResults[1] For $oTag In $oTags if $oTag.GetAttribute("class") == "NewsDetail" Then _ArrayAdd($aResults, $oTag.innerTEXT) EndIf Next $aResults[0] = UBound($aResults) - 1 _ArrayDisplay($aResults, "Episodelist") ConsoleWrite($aResults[1] & @CRLF) $oIE.GoBack ;get second subject Global $oLink2 = _IEGetObjById($oIE, "ctl00_ctl00_Content_LeftContent_NewsSearch_repNews_ctl01_linkNews") Sleep(500) _IEAction($oLink2, "click") Sleep(500) Local $oTags2 = _IETagNameGetCollection($oIE, "div") Local $aResults2[1] For $oTag2 In $oTags2 if $oTag2.GetAttribute("class") == "NewsDetail" Then _ArrayAdd($aResults2, $oTag2.innerTEXT) EndIf Next $aResults2[0] = UBound($aResults2) - 1 ConsoleWrite($aResults2[1] & @CRLF) Func Terminate() _IEQuit($oIE) Exit EndFunc ;==>Terminate  
    • bowker
      By bowker
      Hi! Is there a way for me to set the value for my slider? I am getting the value for my slider with
       
      Local $strText = _UIA_getPropertyValue($oUIElement, $UIA_LegacyIAccessibleValuePropertyId) MsgBox(0,"",$strText)  
    • nacerbaaziz
      By nacerbaaziz
      Hello
      Can we pause and resume the download in the InetGet function?
      If is possible, what is the solution please?
      I used this code To manage the download

      #include <INet.au3> func _downloader($name, $linc, $filepath, $RTLF = false, $link = false) global $downloader = GUICreate("downloader", 400, 200, -1, -1, $WS_CLIPCHILDREn, $RTLF, $link) global $path = $filePath $labelTxt = GUICtrlCreateLabel("downloading " & $name, 50, 10, 200, 20) global $labelTxt0 = GUICtrlCreateLabel("downloaded size 0 MB " & "OF 0 MB", 50, 60, 300, 20) global $Progress = "" global $sText = ""     For $i = 1 To Random(5, 20, 1) ; Return an integer between 5 and 20 to determine the length of the string.         $sText &= Chr(Random(65, 122, 1)) ; Return an integer between 65 and 122 which represent the ASCII characters between a (lower-case) to Z (upper-case). next global $labelTxt2 = GUICtrlCreateInput("0%", 50, 80, 50, 20) _GUICtrlEdit_SetReadOnly(-1, true) GUIStartGroup("") global $beep = GUICtrlCreateCheckBox("use the progress beep notification", 150, 120, 200, 20) GUIStartGroup("") $button = GUICtrlCreateButton("Cancel', 130, 150, 180, 25, 0x01) $iIndex = 0 global $Target global $url GUIStartGroup("") global $Progress = GUICtrlCreateProgress(50, 90, 150, 20) global $Target = $filepath global $url = $linc global $path = $filepath global $hDownloadNo = _RSMWare_GetData($url, $Target) global $status = false AdlibRegister("SetProgress") global $onprogress = false, $curent = false GUISetState(@sw_Show) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $button $asc = MsgBox(4132,"exit download?","if you click yes the downloading will be cancel, do you want to cancel it ?") if $asc = 6 then AdlibUnRegister("SetProgress") GUIDelete() If $hDownloadNo <> 0 Then InetClose($hDownloadNo) exitLoop endIf EndSwitch if $status = -1 then $status = 0 $hDownloadNo = _RSMWare_GetData($url, $Target) $onprogress = false $curent = false elseIf $Status = 1 then $status = $path GUIDelete() AdlibUnRegister("SetProgress") exitLoop endIf WEnd return $status endFunc Func _RSMWare_GetData($url, $Target) Local $hDownload = InetGet($url, $Target, 1, 1) Return $hDownload EndFunc ;==>_RSMWare_GetData Func SetProgress() Local $state If $hDownloadNo <> 0 Then $state = InetGetInfo($hDownloadNo) If @error = 0 Then $infor = "downloaded size " & Round(Execute(InetGetInfo($hDownloadNo, $INET_DOWNLOADREAD) / 1048576), 2) & " MB of " & Round(Execute(InetGetInfo($hDownloadNo, $INET_DOWNLOADSIZE) / 1048576), 2) & " MB " $onprogress = Round(Ceiling(($state[0] / $state[1]) * 100)) if not (InetGetInfo($hDownloadNo, $INET_DOWNLOADSIZE) = 0) then if $onProgress <= 0 then $onProgress = 0 GUICtrlSetData($Progress, $onProgress) GUICtrlSetData($labelTxt0, $infor) GUICtrlSetData($labelTxt2, $onProgress & "%") if _isChecked($beep) then if $onprogress > $curent then beep((100 + $onprogress * 20), 100) $curent = $onprogress endIf endIf endIf If $state[2] Then If $state[3] Then InetClose($hDownloadNo) $status = 1 else InetClose($hDownloadNo) $status = -1 endIf endIf EndIf endIf EndFunc ;==>SetProgress
    • VollachR
      By VollachR
      Hi,
      I'm looking for a way to take a number value from a Row2 of a 2D array and according to this check if files that appear in rows 3-11 in the array exists.
      For example, if the number in Row2 is 5 I need to check for the files in Row 3-6 only, if it is 6 than rows 3-7 and so on.
      I thought on using a FOR loop but I have very little experience with those.
      Can you suggest the best way to do what I need?
      BTW, the files in Rows 3-11 will usually have blank value for any row above the number in Row2 (e.g. Row2 = 5 so Rows3-6 will have values but 8-11 be empty), The values I need are in Column 1 of the array, the name of the key from the INI file that the array was created from is in Column 0.
      Full Example:
      Row2 of Array:
      Col0 = Games# - Col1 = 5
      Rows3-6
      Col0 = Exe2 - Col1 = Path To File
      Col0 = Exe3 - Col1 = Path To File
      Col0 = Exe4 - Col1 = Path To File
      Col0 = Exe5 - Col1 = Path To File
      I need that if Row2 is 5 to check these above for rows if the file exists, if it was 6 then the next row as well and so on up until number 10 in Row2 as it can't go above 10.
      So basically for whatever number in Row2 from 2-10 need to check 1-9 rows from 3-11 to see if the files in Col1 exists and if any of them don't exist it should call a function that shows an error message.
      I'm pretty sure I have the first line of the for look correct:
      For $i = 1 To $aAIO[2][1] Just not sure how to continue from there, also not sure if $i should be equal 1 or 2.
      Help will be appreciated.
×