教えてください StudioXでクリップボード不可能 OpenClipboard に失敗しました (0x800401D0 (CLIPBRD_E_CANT_OPEN))

開発環境では問題なかったのですが、
運用環境でテストしたところ、
クリップボードに値コピーするところが何度やっても

OpenClipboard に失敗しました (0x800401D0 (CLIPBRD_E_CANT_OPEN))

となります
回避策、対応策はありますでしょうか
(Clipboard.Clear をするとよい、と開発者系のブログで見ましたが、
StudioXでどのように実装すればよいのかわかりません)

アドバイスなど よろしくお願いします

変数の値を設定(Xには[クリップボードに設定]アクティビティがないので代替)
20240618_clipbordeset

実行時エラー

Hi @111790

In Set Variable Value you have give the same below syntax:

ClipboardX.StringValue = strvar

In Write Cell Excel activity in What to Write pass ClipboardX.StringValue and in where to write pass the Cell Value where you want to write.

This should work.

Regards

Thank you for your comment.

I didn’t describe what I wanted to do enough.
It is not a process that I want to fit into an Excel cell.
It is a process to input values read from an Excel file
It is a process to input values read from an Excel file into an input screen of another system.

If the screen item in question is an activity that says
[The “Enter text” activity is not a good way to input values
The “Enter text” activity does not work well with values that contain line feed codes, so we need to use the clipboard and press Ctrl+V.
I am using the clipboard and copying and pasting the value using Ctrl+V.

It works fine on the development terminal…

Hi @111790
After copying the value to clipboard Ctrl+V is also an way to paste the values.

Regards

こんにちは

このエラーが出ても、値は正しくセットされているケースもあるようなので
取り急ぎその変数の値を設定アクティビティを直接トライキャッチで囲ってみて
一旦例外を回避しておいて、その後値がクリップボードに正しくセットされているかを
確認してみてはと思います。

1 Like

Yoichiさま
ありがとうございます

StudioXで トライキャッチ は使えましたでしょうか?

StudioX で トライキャッチを使おうとしてみましたが、
Tryにアクティビティを設置しようとしたら
↓のようなエラーがでて設置できませんでした(泣)…

スクリーンショット 2024-06-18 134808

こんにちは

バージョンによりこのエラーが出る場合があるようです。(手元の環境でも出ました)
アクティビティをドロップする位置を少し変えてみる等してみて改善しないか確認してみてはと思います。

1 Like

こんにちは
ありがとうございます

いったんStudioで編集した後、
StudioXで確認できたので大丈夫ぽいです

>このエラーが出ても、値は正しくセットされているケースもあるよう
たしかに該当端末で確認したところ、
エラーは発生するのですが
値は正しくセットされていましたので
エラーをスルーするためのトライキャッチで囲んだら
どうにかうまくいきました

ご助言 ありがとうございました!
大変たすかりましたヽ(^o^)丿

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.