Jump to content



Photo

Ui Html Panel - Open File & Run Button Problem


  • Please log in to reply
4 replies to this topic

#1 cjacobs

cjacobs

    Member

  • Fellow UBotter
  • PipPip
  • 19 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5
  • License:Developer Edition

Posted 11 June 2018 - 05:43 PM

Hi,
 
I'm working on a UI html panel and I cannot get my Open File button or Start buttons to function. I defined the Start but am not having any luck.
 
 
 
Can anyone see my problem in the following code?
 
 
 
--Open File Button--
 
<button variable="#localBizs" fillwith="value" type="file" id="addimager89966" dialogtype="open" name="file" class="button08" style="text-decoration:none;padding:7px 15px;font-family:Georgia;font-size:18px;font-weight:800;color:#000000;border-radius:9px;"><!--lab-->Load Local Business File</button>
 
--Run Button--
 
<button id="addimager246634"  onclick="ubot.runScript('Start()')" class="button02" style="text-decoration:none;padding:7px 15px;font-family:Georgia;font-size:18px;font-weight:400;color:#ffffff;border-radius:6px;"><!--lab-->Create Driving Directions</button>
 
Thanks


#2 darryl561

darryl561

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 558 posts
  • LocationAustralia
  • OS:Windows 7
  • Total Memory:2Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 12 June 2018 - 04:13 AM

Use "File Select" instead of a button to add an Open File element.

The Start button works fine, you just need to add a define to your bot called "Start" and add your commands to the define.
 

ui html panel("--Open File Button--
 
<input variable=\"#localBizs\" fillwith=\"value\" type=\"file\" id=\"addimager89966\" dialogtype=\"open\" name=\"file\" class=\"button08\" style=\"text-decoration:none;padding:7px 15px;font-family:Georgia;font-size:18px;font-weight:800;color:#000000;border-radius:9px;\"><!--lab-->Load Local Business File</input>
 
--Run Button--
 
<button id=\"addimager246634\"  onclick=\"ubot.runScript(\'Start()\')\" class=\"button02\" style=\"text-decoration:none;padding:7px 15px;font-family:Georgia;font-size:18px;font-weight:400;color:#ffffff;border-radius:6px;\"><!--lab-->Create Driving Directions</button>",333)
define Start {
    alert("Button is working")
}


herosig.jpg

UI Editor Genie                                 GUI Hero


#3 cjacobs

cjacobs

    Member

  • Fellow UBotter
  • PipPip
  • 19 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5
  • License:Developer Edition

Posted 12 June 2018 - 06:26 AM

Hi Darryl,

 

I saw the file select but didn't want to use the images shown. There has to be a way to use an image button.

 

Thanks,

Cavin



#4 UBotBuddy

UBotBuddy

    UBot Studio Training

  • ADMIN
  • 3516 posts
  • LocationVirginia
  • OS:Windows 10
  • Total Memory:8Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 17 June 2018 - 03:38 PM

What images are you referring to?  What Darryl showed you is an excellent example of what you need to use.

 

I guess I'm missing the point of what you are striving to acheive.

 

Buddy


UBot Training for FREE! Yes, that is correct!

#5 cjacobs

cjacobs

    Member

  • Fellow UBotter
  • PipPip
  • 19 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5
  • License:Developer Edition

Posted 17 June 2018 - 04:06 PM

Problem solved.

I got it working with another UI builder.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users