http://www.hatena.ne.jp/1082461864

の回答4.aki73ixさんのソフトを、より変換可能な文章を長く(aki73ixさんのソフトは2000行ほどなのでその10倍の20000行以上)し、aki73ixさんのソフトは右クリックで貼り付けできませんので右クリックで貼り付けできるようなソフトを作成して欲しいのです。宜しくお願いいたします。なお、CGIなどのHPで変換するものではなく、ダウンロードして変換できる
もの(言語は不問)をお願いいたします。動作環境Winxpです。1名に500ポイント差し上げます。

回答の条件
  • URL必須
  • 1人2回まで
  • 登録:
  • 終了:--
※ 有料アンケート・ポイント付き質問機能は2023年2月28日に終了しました。

回答9件)

id:takasiym No.1

回答回数165ベストアンサー獲得回数0

http://www.vector.co.jp/soft/win95/util/se081909.html

Visual Basic 5.0(SP3) ランタイム(Windows95/98/Me / ユーティリティ)

自作しました。

のっかりでアップロードした先のアドレスをお送りします。

lhaファイルを展開すると、

vbのソースファイルと実行ファイルがありますので、

お試し下さい。

ちなみにvbの実行ファイルはランタイムdllが必要です。

こちらで動作確認しましたが、動かなかったらゴメンなさい。

id:powan

ありがとうございます。ですが、フリーズしてしんまいました。

2004/06/25 13:05:33
id:aki73ix No.2

回答回数5224ベストアンサー獲得回数27

http://www.hatena.ne.jp/1082479198

何度も繰り返しですいません。 「テキストファイル」で指定の文字を、その指定した文字の後ろに半角数字1,1,2,2,3,3…(連続してから1つ数字を足しまた連続し、また1つ数字.. - 人力検索はてな

http://www.hatena.ne.jp/1082461864

ある文字が出てきたら、1,2,3,4,5,6,7…という数字の順に置き換えていきたいのですが、そのようなソフトはないでしょうか? 例えば、適当に入力をしたのですが以下の文字列.. - 人力検索はてな

の両方に対応した拡張バージョンです

チェックを入れればファイル出力にも対応します

id:powan

ありがとうございます。ですが、10000行で試したところフリーズしてしまいました。また、変換文字列の行の上下が改行してしまします。

すいませんが、条件を追加です。変換対象の文字列は、残る様にしてください。

2004/06/25 13:42:26
id:marlene7196 No.3

回答回数144ベストアンサー獲得回数0

ポイント30pt

http://www.fake.com/

FAKE LANDSCAPES - the artificial plant company

perlでつくりました。

perl count.pl < sample.txt > out.txt

$aにカウントしたい文字を入れてください

大文字、小文字の区別あり。半角英数字、デリミターはスペースです。

count.pl

--------------------

$a = ”Cattleya”;

$count = 0;

while( $str = <STDIN>){

#$str = $_;

$i = 0;

$i = 0; $j = 0;

while( $str =~ /(¥S+)/g ) { $par[$i++] = $1;}

while($j != $i) {

if ($par[$j] =~ m/$a/i) {

$count++; $par[$j] =~ s/$a/$count/g;

}

print $par[$j].” ”;

$j++

}

}

sample.txt

-------------------------

Cattleya gaskelliana – Reichenbach f. 1883

Named for Mr. Holbrook Gaskell, a collector/grower and chemical manufacturer in Liverpool, U.K.

This species is also found in Colombia. The plants grow both epiphytically on trees next to streams as well as lithophytically on rocks in full sun. The flowers are the largest in the genus (after C. warscewiczii), up to 18-20cm across. They have good substance and are pale-medium lavender with a yellow throat and a darker purple patch on the apical portion of the lip. There are also rare alba, semi-alba, and coerulea (‘Blue Dragon’) varieties. It grows at 700-1100m and thus requires cooler conditions and a dry rest. Blooms July to September.

Cattleya jenmanii – Rolfe 1906

This species grows in bright light between 400-1000m in the Roraima area of southern VZ and is also found in neighboring Guyana. It was “lost” between 1906 and 1969, when Garay idenitified some plants collected by Dunsterville. Flowers are typically rich rose-purple with orange-yellow veins in throat, two white eyes, and a darker purple spot toward apex of lip. There are several color forms, including alba, semi-alba, concolor, coerulea, and aquini. Blooms in December and has a nice perfume.

Cattleya lueddemanniana – Reichenbach f. 1854

This endemic species is prized for its perfumed fragrance, rich rose-purple color and full flowers. There are also white, blue, and semi-alba forms. Native to the warm to hot, dryer, north-facing lowlands of the Venezuelan coastal range. It has nearly cylindrical pseudobulbs and long, narrow leaves. Described by Reichenbach in ’Exnia Orchidacea’ and named after Mr. Lueddemann, the gardener of Ms. Pescatore of St. Cloud - Paris. Later recognized as the same species as the British Cattleya speciosissima. Famous clone ‘Stanley’s’ blooms in spring (April, May) in Houston. Needs a dry rest period; grow in clay with a well-draining medium.

out.txt

-------------------------

1 gaskelliana ? Reichenbach f. 1883 Named for Mr. Holbrook Gaskell, a collector/grower and chemical manufacturer in Liverpool, U.K. This species is also found in Colombia. The plants grow both epiphytically on trees next to streams as well as lithophytically on rocks in full sun. The flowers are the largest in the genus (after C. warscewiczii), up to 18-20cm across. They have good substance and are pale-medium lavender with a yellow throat and a darker purple patch on the apical portion of the lip. There are also rare alba, semi-alba, and coerulea (‘Blue Dragon’) varieties. It grows at 700-1100m and thus requires cooler conditions and a dry rest. Blooms July to September. 2 jenmanii ? Rolfe 1906 This species grows in bright light between 400-1000m in the Roraima area of southern VZ and is also found in neighboring Guyana. It was “lost” between 1906 and 1969, when Garay idenitified some plants collected by Dunsterville. Flowers are typically rich rose-purple with orange-yellow veins in throat, two white eyes, and a darker purple spot toward apex of lip. There are several color forms, including alba, semi-alba, concolor, coerulea, and aquini. Blooms in December and has a nice perfume. 3 lueddemanniana ? Reichenbach f. 1854 This endemic species is prized for its perfumed fragrance, rich rose-purple color and full flowers. There are also white, blue, and semi-alba forms. Native to the warm to hot, dryer, north-facing lowlands of the Venezuelan coastal range. It has nearly cylindrical pseudobulbs and long, narrow leaves. Described by Reichenbach in ’Exnia Orchidacea’ and named after Mr. Lueddemann, the gardener of Ms. Pescatore of St. Cloud - Paris. Later recognized as the same species as the British 4 speciosissima. Famous clone ‘Stanley’s’ blooms in spring (April, May) in Houston. Needs a dry rest period; grow in clay with a well-draining medium.

id:powan

すいません。言語不問と書いたので、こちらのミスですが、exeファイルをクリックすれば、起動するものをお願いいたします。

2004/06/25 13:46:22
id:akibare No.4

回答回数157ベストアンサー獲得回数5

ポイント50pt

とりあえず。。。

1)以下をNotepadにコピーペーストして、デスクトップの[お好きな名前.vbs]に保存してください 2) ファイルをダブルクリックしてください 3) 指示に従ってください

どうしても気に入らなければ.NETで作りますけど、面倒だな。

Dim fso, f1p, f2p, f1, f2, line, count

TargetString = ”fa”

TargetString = InputBox(”置き換え文字列を入力してね”)

f1p = InputBox(”入力ファイルのパスを入れてね(例:C:¥in.txt)”)

f2p = InputBox(”出力ファイルのパスを入れてね(例:C:¥out.txt)”)

Set fso = WScript.CreateObject(”Scripting.FileSystemObject”)

set f1 = fso.OpenTextFile(f1p, 1)

set f2 = fso.CreateTextFile(f2p, true)

count = 1

While not f1.AtEndOfStream

line = f1.ReadLine

pos = 0

pos = InStr(1, line, TargetString)

While (pos > 0)

f2.Write(left(line, pos - 1))

f2.write(count)

count = count + 1

line = right(line, len(line) - pos - len(TargetString) + 1)

pos = InStr(1, line, TargetString)

wend

f2.WriteLine(line)

Wend

id:powan

エラーになります。

「行2

文字16エラー文字が正しくありません。

コード800A0408

ソースMicrosoft VBscriptコンパイルエラー」

2004/06/25 14:44:16
id:aki73ix No.5

回答回数5224ベストアンサー獲得回数27

ポイント300pt

>ありがとうございます。ですが、10000行で試したところフリーズしてしまいました。

いえ、フリーズではありません。

8000行を越えたあたりからSwapが大量に発生するので処理が遅くなります。(Memoコンポーネントの制約)

というわけで、途中経過の表示機能と、ESCAPEによるキャンセル機能を追加しました

>また、変換文字列の行の上下が改行してしまします。

ファイルから呼んだ場合の問題ですかね

ちょっといじってみました

>すいませんが、条件を追加です。変換対象の文字列は、残る様にしてください。

デフォルトでチェック入れるようにしました

id:powan

ありがとうございます。

2004/06/29 15:05:02
id:ttsuki No.6

回答回数4ベストアンサー獲得回数0

ポイント50pt

HSPで自作ってみました。

変換対象のファイルをexeにD&Dして使ってください。

少しなら複数ファイルも同時に行けます。

穴があったらごめんなさい。

複数文字入力した場合の動作は保証しません。

また、akibareさんのVBSは、コピペするときにダブルクォーテーション(”)が全角になってしまってるようで、

それを半角に書き直してやれば動くと思います。

id:powan

ありがとうございます。

2004/06/29 15:05:13
id:kuippa No.7

回答回数1030ベストアンサー獲得回数13

ポイント500pt

ぅぅ・・・。

もうこんな時間じゃないか。

10分で完成させるつもりだったのに…。

いちおうVBでコンパイルしてあります。

20000行は正直保証範囲ではありませんが、サーバサイドの実行時アプリよりはある程度性能でるかな。

VBランタイム必要そうなのを適当につっこんだだけなので、起動時に足りないエラーがでたらいってください。

2万行か…。

だいじょうぶかな。

id:powan

ありがとうございます。

2004/06/29 15:05:28
id:mina_blue No.8

回答回数14ベストアンサー獲得回数0

ポイント100pt

Win2kSP4,C++Builder5の環境で作成しました。

「右クリックで貼り付け」を実装しています。

20,000行の方は、時間がかなりかかりますので、分割して変換することをお勧めします。

(一応、可能ですが・・・)

Disk1フォルダ:ランタイムdllが無い場合はこちら。

実行ファイルフォルダ:有る場合はこちらでも可。

ソースは、ご要望があれば、ということで。

※ファイルはその内に消します。ご注意を。

id:powan

ありがとうございます。

2004/06/29 15:05:40
id:takasiym No.9

回答回数165ベストアンサー獲得回数0

ポイント300pt

上記ダミーです。

今回は、Visual C++ 6.0で作成しました。

先程のっかりでアップロード先のアドレスをお送りしました。

スタティックライブラリでビルドしたので、

ランタイムDLLも必要ないので、

単体で動作すると思います。

10,000行以上の処理も動作確認済みです。

但し20000行以上の場合、処理が完了するまでに、

数分かかると思います。

宜しくお願いします。

id:powan

ありがとうございます。ポイント決定は1週間以内に行います。

2004/06/29 15:06:17

コメントはまだありません

この質問への反応(ブックマークコメント)

「あの人に答えてほしい」「この質問はあの人が答えられそう」というときに、回答リクエストを送ってみてましょう。

これ以上回答リクエストを送信することはできません。制限について

回答リクエストを送信したユーザーはいません