Paste WebGadget doesn't work

Just starting out? Need help? Post your questions and find answers here.
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Paste WebGadget doesn't work

Post by Nico »

Impossible to copy the text in the WebGadget :x :roll:

Code: Select all

Enumeration 1
  #OLECMDID_OPEN
  #OLECMDID_NEW
  #OLECMDID_SAVE
  #OLECMDID_SAVEAS
  #OLECMDID_SAVECOPYAS
  #OLECMDID_PRINT
  #OLECMDID_PRINTPREVIEW
  #OLECMDID_PAGESETUP
  #OLECMDID_SPELL
  #OLECMDID_PROPERTIES
  #OLECMDID_CUT
  #OLECMDID_COPY
  #OLECMDID_PASTE
  #OLECMDID_PASTESPECIAL
  #OLECMDID_UNDO
  #OLECMDID_REDO
  #OLECMDID_SELECTALL
  #OLECMDID_CLEARSELECTION
  #OLECMDID_ZOOM
  #OLECMDID_GETZOOMRANGE
  #OLECMDID_UPDATECOMMANDS
  #OLECMDID_REFRESH
  #OLECMDID_STOP
  #OLECMDID_HIDETOOLBARS
  #OLECMDID_SETPROGRESSMAX
  #OLECMDID_SETPROGRESSPOS
  #OLECMDID_SETPROGRESSTEXT
  #OLECMDID_SETTITLE
  #OLECMDID_SETDOWNLOADSTATE
  #OLECMDID_STOPDOWNLOAD
EndEnumeration

Enumeration 0
     #OLECMDEXECOPT_DODEFAULT
     #OLECMDEXECOPT_PROMPTUSER
     #OLECMDEXECOPT_DONTPROMPTUSER
     #OLECMDEXECOPT_SHOWHELP
EndEnumeration

#Paste=1002

If OpenWindow(0, 0, 0, 600, 600, "WebGadget", #PB_Window_ScreenCentered|#PB_Window_SystemMenu)

    AddKeyboardShortcut(0,#PB_Shortcut_Control | #PB_Shortcut_V, #Paste)
  
  If CreateGadgetList(WindowID(0))
    WebGadget(0, 20, 20, 560, 560, "http://purebasic.fr/french/login.php")
    WebObject.IWebBrowser2 = GetWindowLong_(GadgetID(0), #GWL_USERDATA)
     
   
  Repeat
    Event =WaitWindowEvent()
    Select Event
      Case #PB_Event_Menu
        Select EventMenu() 
            Case #Paste
            SetClipboardText("PureBasic")
            WebObject\ExecWB(#OLECMDID_PASTE, #OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)
        EndSelect 
    EndSelect 

    Until Event = #PB_Event_CloseWindow
  EndIf
EndIf
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

How are you invoking the 'paste' operation?
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

the text in the webgadget copy works fine here.
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Post by Nico »

Click in a aera text in the WebGadget and do CTRL + V, the text isn't paste.

Don't work for me. :?
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

hmmm...works here like this in PB v 4.10; I can ctrl +V paste and 'PureBasic' is pasted....I can also right click and paste..

Image

is this not what its supposed to do? thats the only text type area showing...or am I mis-understanding?
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Post by Nico »

It's work for you and not for me, why?

I have also PB 4.10! and Internet Explorer 6
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

It works fine for me too.

Just a thought, are you sure you have a valid format on your clipboard?

cheers
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Post by Nico »

MSDN say:
Certain commands (OLECMDID_CUT, OLECMDID_COPY, and OLECMDID_PASTE) are only available if URLACTION_SCRIPT_SAFE_ACTIVEX and URLACTION_SCRIPT_PASTE are set to URLPOLICY_ALLOW.
How to program that!
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Nico wrote:Click in a aera text in the WebGadget and do CTRL + V, the text isn't paste.

Don't work for me. :?
Are you attempting to paste into the username or password area or into some other area?

cheers
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

maybe something to do with IE6 in some odd way?

maybe clipboard issue of some type?

permissions of some sort?

Dunno, but works fine here. I'm using Vista Ultimate (if it makes a difference).
Nico
Enthusiast
Enthusiast
Posts: 274
Joined: Sun Jan 11, 2004 11:34 am
Location: France

Post by Nico »

I found, if copy and paste does not work, it is necessary to do:

[in French sorry]
Outils-->Option internet-->Onglet Sécurité-->Personnaliser le niveau-->Autoriser l'accès programmatique du presse-papiers-->cocher autoriser

Thanks for your Help!
Post Reply